From a426feb6c2e2271a8008b17164e682c3a5ee8bb0 Mon Sep 17 00:00:00 2001 From: hogliux Date: Mon, 11 Sep 2017 09:12:28 +0100 Subject: [PATCH] VST3: checkBusFormatsAreNotDiscrete should return true when buses are disabled --- .../VST3/juce_VST3_Wrapper.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 7f02cc0da0..1632d9ae3d 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1851,12 +1851,20 @@ public: auto numOutputBuses = pluginInstance->getBusCount (false); for (int i = 0; i < numInputBuses; ++i) - if (pluginInstance->getChannelLayoutOfBus (true, i).isDiscreteLayout()) + { + auto& layout = pluginInstance->getChannelLayoutOfBus (true, i); + + if (layout.isDiscreteLayout() && ! layout.isDisabled()) return false; + } for (int i = 0; i < numOutputBuses; ++i) - if (pluginInstance->getChannelLayoutOfBus (false, i).isDiscreteLayout()) + { + auto& layout = pluginInstance->getChannelLayoutOfBus (false, i); + + if (layout.isDiscreteLayout() && ! layout.isDisabled()) return false; + } return true; }