I’ve created somehting like this:
#if !JucePlugin_IsMidiEffect
#if !JucePlugin_IsSynth
props = props.withInput("Mono L", juce::AudioChannelSet::mono(), true)
.withInput("Mono R", juce::AudioChannelSet::mono(), true);
#endif
props = props.withOutput("L", juce::AudioChannelSet::mono(), true)
.withOutput("R", juce::AudioChannelSet::mono(), true)
.withOutput("C", juce::AudioChannelSet::mono(), true)
.withOutput("LFE", juce::AudioChannelSet::mono(), true)
.withOutput("WL", juce::AudioChannelSet::mono(), true)
.withOutput("WR", juce::AudioChannelSet::mono(), true)
.withOutput("SL", juce::AudioChannelSet::mono(), true)
.withOutput("SR", juce::AudioChannelSet::mono(), true)
.withOutput("LS", juce::AudioChannelSet::mono(), true)
.withOutput("RS", juce::AudioChannelSet::mono(), true)
.withOutput("TL", juce::AudioChannelSet::mono(), true)
.withOutput("TR", juce::AudioChannelSet::mono(), true)
.withOutput("LC", juce::AudioChannelSet::mono(), true)
.withOutput("RC", juce::AudioChannelSet::mono(), true)
.withOutput("TRL", juce::AudioChannelSet::mono(), true)
.withOutput("TRR", juce::AudioChannelSet::mono(), true);
But when in Reaper I set the vst3 bus size to a value greater than 9, I get the JUCE assertion in juce_VST3Common.h:740 to fail.
void DPannerAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock)
{
DBG("***** prepareToPlay *****");
int totalInputChannels = getTotalNumInputChannels();
int mainBusInputChannels = getMainBusNumInputChannels();
int totalOutputChannels = getTotalNumOutputChannels();
int mainBusOutputChannels = getMainBusNumOutputChannels();
DBG("Total Number of Input Channels: " + juce::String(totalInputChannels));
DBG("Main Bus Number of Input Channels: " + juce::String(mainBusInputChannels));
DBG("Total Number of Output Channels: " + juce::String(totalOutputChannels));
DBG("Main Bus Number of Output Channels: " + juce::String(mainBusOutputChannels));
Total Number of Input Channels: 9
Main Bus Number of Input Channels: 9
Total Number of Output Channels: 9
Main Bus Number of Output Channels: 9
JUCE Assertion failure in juce_VST3Common.h:740
JUCE Assertion failure in juce_VST3Common.h:740
How to shield code properly ?