In a plugin i need to access the (VST-secific) speakerArranment, more specific: i need the “speakerIn/speakerOut” combination which was successfully set by the host, this is very important but i don’t want to hack juce source tree.
Could you simply implement attribute like speakerArrangementIn, speakerArrangementOut in AudioProcessor, Next to numInputChannels, numOutputChannels, sampleRate , blockSize.
To be more platform interdependent this could be a white-space separated string.
And this would be the translation function in the VSTWrapper (other PluginFormats could just give String::empty if its not supported)
String getSpeakerString(VstSpeakerArrangementType t)
{
switch (t)
{
case kSpeakerArrMono: return "M";
case kSpeakerArrStereo: return "L R";
case kSpeakerArrStereoSurround: return "Ls Rs";
case kSpeakerArrStereoCenter: return "Lc Rc";
case kSpeakerArrStereoSide: return "Sl Sr";
case kSpeakerArrStereoCLfe: return "C Lfe";
case kSpeakerArr30Cine: return "L R C";
case kSpeakerArr30Music: return "L R S";
case kSpeakerArr31Cine: return "L R C Lfe";
case kSpeakerArr31Music: return "L R Lfe S";
case kSpeakerArr40Cine: return "L R C S";
case kSpeakerArr40Music: return "L R Ls Rs";
case kSpeakerArr41Cine: return "L R C Lfe S";
case kSpeakerArr41Music: return "L R Lfe Ls Rs";
case kSpeakerArr50: return "L R C Ls Rs" ;
case kSpeakerArr51: return "L R C Lfe Ls Rs";
case kSpeakerArr60Cine: return "L R C Ls Rs Cs";
case kSpeakerArr60Music: return "L R Ls Rs Sl Sr ";
case kSpeakerArr61Cine: return "L R C Lfe Ls Rs Cs";
case kSpeakerArr61Music: return "L R Lfe Ls Rs Sl Sr";
case kSpeakerArr70Cine: return "L R C Ls Rs Lc Rc ";
case kSpeakerArr70Music: return "L R C Ls Rs Sl Sr";
case kSpeakerArr71Cine: return "L R C Lfe Ls Rs Lc Rc";
case kSpeakerArr71Music: return "L R C Lfe Ls Rs Sl Sr";
case kSpeakerArr80Cine: return "L R C Ls Rs Lc Rc Cs";
case kSpeakerArr80Music: return "L R C Ls Rs Cs Sl Sr";
case kSpeakerArr81Cine: return "L R C Lfe Ls Rs Lc Rc Cs";
case kSpeakerArr81Music: return "L R C Lfe Ls Rs Cs Sl Sr" ;
case kSpeakerArr102: return "L R C Lfe Ls Rs Tfl Tfc Tfr Trl Trr Lfe2";
};
return String::empty;
}