From 4bcb4d4dc8d665dc7119f74f3a826c99c5798191 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 25 May 2022 05:05:09 +0100 Subject: [PATCH] More tweaks to getBusArrangement, add stereo tag to example meter Signed-off-by: falkTX --- distrho/src/DistrhoPluginVST3.cpp | 48 +++++++++++++++++++++---- examples/Meters/ExamplePluginMeters.cpp | 13 +++++++ 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp index 6e5665ed..00ede581 100644 --- a/distrho/src/DistrhoPluginVST3.cpp +++ b/distrho/src/DistrhoPluginVST3.cpp @@ -1027,19 +1027,37 @@ public: if (port.busId != ubusId) continue; + v3_speaker_arrangement arr; + switch (port.groupId) { case kPortGroupMono: - *speaker = V3_SPEAKER_M; + arr = V3_SPEAKER_M; break; case kPortGroupStereo: - *speaker = V3_SPEAKER_L | V3_SPEAKER_R; + arr = V3_SPEAKER_L | V3_SPEAKER_R; break; default: - *speaker = 0; + if (inputBuses.audio != 0 && ubusId == 0) + { + arr = 0x0; + for (uint32_t j=0; j