13
0

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.
This commit is contained in:
Robin Gareus 2023-03-19 01:20:36 +01:00
parent 2ea0bb5f37
commit c3c44d61a4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2197,7 +2197,7 @@ VST3PI::enable_io (std::vector<bool> const& ins, std::vector<bool> 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;
}
}