Why does getTotalNumInputChannels() always return 2 for VST and VST3


#1

I have a Plug-In that implements:

bool SpacealiserAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
    return
        !layouts.getMainInputChannelSet().isDisabled() &&
        layouts.getMainInputChannels() > 0 &&
        layouts.getMainInputChannels() <= 8 &&
        !layouts.getMainOutputChannelSet().isDisabled() &&
        layouts.getMainOutputChannels() == 2
    ;
}

i.e. accept everything with two outputs and one to eight inputs.

I observe the following in reaper when I load my plugin onto a 5.1 (i.e. six channels) track:

VST:

  • getTotalNumInputChannels() returns 2
  • reaper recognises that the plugin supports up to eight inputs: image

VST3:

  • getTotalNumInputChannels() returns 2
  • plugin is only recognised to support two input channels: image

AU:

  • getTotalNumInputChannels() returns 6
  • reaper loads the plugin as 6 inputs / 2 outputs: image

Standalone:

  • getTotalNumInputChannels() returns 2
  • I can only select a single stereo pair in the default device selector

I want the behaviour of the AU wrapper in all cases. Is this possible? Why do VST / VST3 plugins behave like this? Is this documented somewhere ?

Thanks & best,
Ben

anyone ?


#2

did you try change your constructor to maximum channels as your preferred ?
in your AudioProcessor

AudioProcessor (
                BusesProperties()
                .withInput ("Input", AudioChannelSet::stereo())
                .withOutput ("Output", AudioChannelSet::stereo())

try other settings than ::stereo , I think it should provide what you’re after.