Browse Source

Reject any inconsistent VST-2 channel layout requests

tags/2021-05-28
hogliux 9 years ago
parent
commit
3ff5ed0f44
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp

+ 14
- 0
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -938,6 +938,20 @@ public:
if (pluginOutput != nullptr && numOuts == 0)
return false;
if (pluginInput != nullptr && pluginInput->type >= 0)
{
// inconsistent request?
if (SpeakerMappings::vstArrangementTypeToChannelSet (*pluginInput).size() != pluginInput->numChannels)
return false;
}
if (pluginOutput != nullptr && pluginOutput->type >= 0)
{
// inconsistent request?
if (SpeakerMappings::vstArrangementTypeToChannelSet (*pluginOutput).size() != pluginOutput->numChannels)
return false;
}
if (numIns > 1 || numOuts > 1)
{
int newNumInChannels = (pluginInput != nullptr && pluginInput-> numChannels >= 0) ? pluginInput-> numChannels


Loading…
Cancel
Save