1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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.
This commit is contained in:
reuk 2022-08-30 17:44:55 +01:00
parent 6feeb7dcdd
commit 98d81bf87a
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -627,7 +627,7 @@ static bool validateLayouts (Iterator first, Iterator last, const std::vector<Dy
const auto anyChannelIsNull = std::any_of (busPtr, busPtr + it->numChannels, [] (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;
}