OK I now understand the origin of this problem: it occurs if the VST2 plug-in sets VST2’s kVstPinIsStereo
flag on every other output pin but does not supply any arrangement information.
In old JUCE versions this would happen if you override AudioProcessor::isInputChannelStereoPair (int index)
to always return true.
The way that JUCE handles this situation kind of makes sense: if every other output is marked as stereo then the plug-in must have multiple stereo outputs - hence the several stereo output buses that you are seeing!
The confusion comes on how to interpret surround formats. For example, the “L R”, “Ls Rs”, “C” in “L R Ls Rs C” can also be interpreted as two stereo pairs (L R), (Ls Rs) and a mono channel C - hence two stereo buses and a mono bus.
In any case, JUCE will use the correct layout if the VST2 explicitly returns a valid speakerArrangement (which all plug-ins should be doing anyway). In this case, JUCE will just use that.
Unfortunately, older JUCE versions do not return a valid speakerArrangement unless the host specifically asks for a specific layout.
I’ve now added a workaround (it will appear on develop in a few minutes) which should fix this situation: if the plug-in does not return any valid speaker arrangement, then JUCE will try to assign a default layout with the same number of channels as the plug-in reports. This will then force old JUCE plug-ins to then report the correct layout.