Browse Source

VST2 Hosting: Don't try changing the channel layout for multi-bus VST2s. Multi-bus VST2s have a fixed layout.

tags/2021-05-28
hogliux 7 years ago
parent
commit
8eb18cd5ae
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 9
- 3
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -743,12 +743,18 @@ struct VSTPluginInstance : public AudioPluginInstance,
//==============================================================================
void prepareToPlay (double rate, int samplesPerBlockExpected) override
{
auto numInputBuses = getBusCount (true);
auto numOutputBuses = getBusCount (false);
setRateAndBufferSizeDetails (rate, samplesPerBlockExpected);
SpeakerMappings::VstSpeakerConfigurationHolder inArr (getChannelLayoutOfBus (true, 0));
SpeakerMappings::VstSpeakerConfigurationHolder outArr (getChannelLayoutOfBus (false, 0));
if (numInputBuses <= 1 && numOutputBuses <= 1)
{
SpeakerMappings::VstSpeakerConfigurationHolder inArr (getChannelLayoutOfBus (true, 0));
SpeakerMappings::VstSpeakerConfigurationHolder outArr (getChannelLayoutOfBus (false, 0));
dispatch (plugInOpcodeSetSpeakerConfiguration, 0, (pointer_sized_int) &inArr.get(), (void*) &outArr.get(), 0.0f);
dispatch (plugInOpcodeSetSpeakerConfiguration, 0, (pointer_sized_int) &inArr.get(), (void*) &outArr.get(), 0.0f);
}
vstHostTime.tempoBPM = 120.0;
vstHostTime.timeSignatureNumerator = 4;


Loading…
Cancel
Save