I made a stereo effect plugin. As VST it comes up in Reaper as (2 in/2 out) which is as expected, but the AU version of the same comes out as (1in/1out) in Reaper… JucePluginHost shows correct (2in/2out) also for the AU.
I figured out its because i have: #define JucePlugin_MaxNumInputChannels 2 #define JucePlugin_MaxNumOutputChannels 2 #define JucePlugin_PreferredChannelConfigurations {1, 1}, {2, 2}
and reaper choose the {1,1} in case of using an AU, and {2,2} for the VST.
What is the rule here? I want the DAWs to choose Stereo if possible, and Mono as fallback - for example in case of using a mono input audio interface.
Jules, it might be worth adding a runtime assertion if these values are supplied in the wrong order...?! :)
well.. not sure what the logic would be for deciding whether it's "wrong' - they're listed in the order of preference, so it could be argues that some plugins might prefer to have the mono option first (?)
When I change the channel configuration of my AU plugin from {1, 1}, {2, 2} to {2, 2}, {1, 1}, it works on a new project however if I load a Reaper project saved with a old channel congiration plugin, it crashes...
May be there is a fix to add in juce_AU_wrapper.mm ?