VST3 SDK returns wrong channel count on duplicating track

Allows to develop VST 3 Audio Plug-ins and VST 3 host.
hnand
Posts: 4
Joined: Wed Oct 05, 2016 9:56 pm

VST3 SDK returns wrong channel count on duplicating track

Postby hnand » Fri May 19, 2017 2:26 am

We develop a plugin that compiles the VST SDK to support both VST2 and VST3 hosts. We are noticing a potential bug in VST3 hosts (Cubase/Nuendo) with the following reproducing steps:
i) create an audio track with stereo configuration/stereo out routing
ii) instantiate plugin on the track, during our plugin init sequence we query for the channel count and for this plugin instance we get 2
iii) duplicate the track

Result: when the new duplicate track is created, it instantiates a new object of our plugin and runs its init sequence. During this init sequence, when we query for the channel count of the track, it returns 1 (mono) even though both the original and duplicated tracks are stereo, and in the init sequence of the original track, the query for the channel count returned 2.

Here is how we query for the channel count during init:

Steinberg::Vst::SpeakerArrangement speakerArr;
if (getBusArrangement(Steinberg::Vst::kOutput, 0, speakerArr) != Steinberg::kResultTrue)
return 0;
return Steinberg::Vst::SpeakerArr::getChannelCount(speakerArr);

Is this the correct way to query for the channel count for a plugin instance on a duplicated track?

We are using Cubase 9 for the testing.

Thanks,
Hari

Arne Scheffler
Posts: 78
Joined: Mon Jun 20, 2016 7:53 am

Re: VST3 SDK returns wrong channel count on duplicating track

Postby Arne Scheffler » Fri May 19, 2017 6:53 am

Hi Hari,
you cannot query the host for channel configurations.
The host will try to set the channel configuration on your plug-in via a call to setBusArrangements ().

Cheers
Arne

hnand
Posts: 4
Joined: Wed Oct 05, 2016 9:56 pm

Re: VST3 SDK returns wrong channel count on duplicating track

Postby hnand » Thu May 25, 2017 12:00 am

Hi Arne,

Is there any way to differentiate during plugin init between duplicated tracks and restored tracks? I see setState() being called in both cases, but there doesn't seem to be a way to differentiate at that point whether this is being called on a duplicated track or on a restored track.

Thanks,
Hari

Arne Scheffler
Posts: 78
Joined: Mon Jun 20, 2016 7:53 am

Re: VST3 SDK returns wrong channel count on duplicating track

Postby Arne Scheffler » Thu May 25, 2017 6:50 am

Hi Hari,
what is your use case that you need to know the difference if your plug-in is duplicated or restored ?

Cheers
Arne


Return to “VST 3 SDK”

Who is online

Users browsing this forum: No registered users and 2 guests