I’m trying to add a second output to my plugin and not really sure what to do. it only shows up as one stereo out. I want it to be stereo or dual stereo.
bool RGAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
// must be stereo out
if (layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
// must be no inputs
if(layouts.getMainInputChannelSet() != AudioChannelSet::disabled() )
return false;
return true;
}
I probably need to change isBusesLayoutSupported(), but to what?
Maybe you have to set it to be a generator or a synth, depending on which wrapper and which host you are using.
Apart from that I would have expected this to work.
Last times I tried to use multibus features, I learned, that there is a lot of “theroetically yes, but…”. See e.g. this answer (my problem was multiple input buses, so you might have more luck, fingers crossed):
I’ve got Plugin Host showing 2 stereo outs but MainStage shows 2 options: Stereo and MultiChannel (16 x stereo). But what I want and what I’m expecting to see is Stereo and MultiChannel (2 x stereo).
I’ve looked and I can’t seem to find any documentation as to what configurations Logic/Mainstage support, but I do see a few plugins in my stash that DO show MultiChannel (2 x stereo).
No matter what I do, MainStage always shows 16 x stereo, so it must be supported, but somehow I’m not configuring my plugin correctly.
Your code looks good to me. However, for some reason, Logic will only show the 2 x stereo option if you do not allow it to change the bus count. This means the last argument in the .withOutput calls in the constructor must both be true and your canAddBus and canRemoveBus must both return false.
It’s strange because auval does show everything correctly without my suggested changes. It just seems that Logic seems extremely picky when it comes to multiple buses.
Using your suggestions, in does in fact, show my 2 desired configurations (Stereo & 2xStereo) in MainStage, but now Plugin Host only shows 1 stereo out and nothing else. Opening Configure I/O gives me no other options.
Really? I just tried this and it’s coming up with two bus outputs:
I took the MultiOutSynth example, removed the extra buses (3-16), set the third parameter of .withOutput to true and modified canAddBus/canRemoveBus ``to return false.
I thought about checking the wrapperType but it hasn’t been set when the constructor of my plugin has been called. Maybe some kind of compile-time check?