From f01ece1bd71e1b4b7872ff4e30ce783babfd9695 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 3 Feb 2021 15:33:07 +0100 Subject: [PATCH] AU: Fix variable I/O instruments Refactoring in 7ec10f77710352d assumed that audio inputs are always present. --- libs/ardour/audio_unit.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 4afcb21f7b..986f67f435 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -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 */