My plugin is flexible with the amount of input and outputs channels and actually follows the DAWs channel layout for the position its instantiated.
A very useful test environment is the standalone mode as well. However the available busses of the audio devices seem to follow the initially set plugin bus layouts. If initially no busses are defined, no audio IO will be available! If its set to stereo, only stereo (or mono in case its single channel) will be available:
But it should be the other way around! The plugin should get offered all available bus configuration and then allow its instantiation.
If I test-wise set the initial bus configuration to 16 discreteChannels with the above device choice the plugin will receive one mono input and a 4 channel output bus (thats what the device can offer), but a 16 channel output bus as well!?
In other words, to what should the initial bus layout be set to receive most flexibly the physically available bus configurations?
Currently the default bus layout is used to determine the maximum number of audio inputs and outputs that can be used in the standalone filter window. Not an expert in bus layouts, but wouldn’t it be better to use bus.getMaxSupportedChannels() instead? On my limited testing this works great.
I suggest to change modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h
from
/** Shows an audio properties dialog box modally. */
void showAudioSettingsDialog()
{
...
if (auto* bus = processor->getBus (true, 0))
maxNumInputs = jmax (0, bus->getDefaultLayout().size());
if (auto* bus = processor->getBus (false, 0))
maxNumOutputs = jmax (0, bus->getDefaultLayout().size());
...
}
to
/** Shows an audio properties dialog box modally. */
void showAudioSettingsDialog()
{
...
if (auto* bus = processor->getBus (true, 0))
maxNumInputs = jmax (0, bus->getMaxSupportedChannels());
if (auto* bus = processor->getBus (false, 0))
maxNumOutputs = jmax (0, bus->getMaxSupportedChannels());
...
}