From c3c44d61a4ebd821e5efa1a18620bb4ae8a8386e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 19 Mar 2023 01:20:36 +0100 Subject: [PATCH] VST3: fix typo in 03263950b, use plugin's SpeakerArr This fixes a crash in some plugins (e.g. Auburn Sounds Couture) when disconnecting all inputs (e.g. moved before a synth). Previously run was called with numChannels = 0 Even though the plugin refused to be configured that way. --- libs/ardour/vst3_plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 7bd4d3c498..1fa855d82b 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2197,7 +2197,7 @@ VST3PI::enable_io (std::vector const& ins, std::vector const& outs) int cc = Vst::SpeakerArr::getChannelCount (arr); DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI: Input BusArrangements: %1 chan: %2 bits: %3%4\n", i, cc, std::hex, arr)); assert (cc <= _bus_info_in[i].n_chn); - if (cc <= _bus_info_in[i].n_used_chn) { + if (cc <= _bus_info_in[i].n_chn) { _bus_info_in[i].n_used_chn = cc; } }