AU: Fix variable I/O instruments

Refactoring in 7ec10f7771 assumed that
audio inputs are always present.
This commit is contained in:
Robin Gareus 2021-02-03 15:33:07 +01:00
parent b50a6fbe17
commit f01ece1bd7

View file

@ -1112,7 +1112,6 @@ AUPlugin::reconfigure_io (ChanCount in, ChanCount aux_in, ChanCount out)
const int32_t audio_in = in.n_audio();
const int32_t audio_out = out.n_audio();
assert (in.n_audio () > 0);
if (initialized) {
/* if we are already running with the requested i/o config, bail out here */
@ -1163,7 +1162,7 @@ AUPlugin::reconfigure_io (ChanCount in, ChanCount aux_in, ChanCount out)
uint32_t used_in = 0;
uint32_t used_out = 0;
if (input_elements == 0) {
if (input_elements == 0 || audio_in == 0) {
configured_input_busses = 0;
} else if (variable_inputs || input_elements == 1 || audio_in < bus_inputs[0]) {
/* we only ever use the first bus and configure it to match */