From 98d81bf87a00ac68152bb0e524976463a9bd7d27 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 30 Aug 2022 17:44:55 +0100 Subject: [PATCH] VST3 Client: Allow channel size mismatches on inactive buses Previously, the bus layout was considered invalid if the host provided an unexpected number of channels on a disabled bus. Specifically, Acoustica 7 would prepare sidechain input buses with a non-zero number of channels, but provide a zero-channel bus during processing. Given that the plug-in doesn't attempt to read from disabled buses, it should be safe to process as normal in this scenario. --- modules/juce_audio_processors/format_types/juce_VST3Common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 77544c7ae3..5d651d0614 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -627,7 +627,7 @@ static bool validateLayouts (Iterator first, Iterator last, const std::vectornumChannels, [] (auto* ptr) { return ptr == nullptr; }); // Null channels are allowed if the bus is inactive - if ((mapIterator->isHostActive() && anyChannelIsNull) || ((int) mapIterator->size() != it->numChannels)) + if (mapIterator->isHostActive() && (anyChannelIsNull || (int) mapIterator->size() != it->numChannels)) return false; }