From 3d84f117b9cafec5e2d627c6ea4b7634221592aa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Jan 2026 21:59:42 +0100 Subject: [PATCH] VST3: amend 45e53ea80, multi-channel instrument fixes --- libs/ardour/vst3_plugin.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index a5ee897d4f..fbd627a2ac 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2348,6 +2348,9 @@ VST3PI::request_bus_layout (uint32_t in, uint32_t aux_in, uint32_t out) int32_t const n_chn = _bus_channel_cnt_in[bn]; Vst::SpeakerArrangement s = sa; + if (n_chn > 0) { + s &= ((uint64_t)1 << n_chn) - 1; + } DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::request_bus_layout bus-width = %1 ; in[%2] = %3%4 \n", n_chn, bn, std::hex, s)); sa_in.push_back (s); @@ -2374,6 +2377,10 @@ VST3PI::request_bus_layout (uint32_t in, uint32_t aux_in, uint32_t out) Vst::SpeakerArrangement s = sa; + if (n_chn > 0) { + s &= ((uint64_t)1 << n_chn) - 1; + } + DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::request_bus_layout bus-width = %1 ; out[%2] = %3%4 \n", n_chn, bn, std::hex, s)); sa_out.push_back (s); if (n_chn > 0) {