mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST2 Hosting: Don't try changing the channel layout for multi-bus VST2s. Multi-bus VST2s have a fixed layout.
This commit is contained in:
parent
df1b43b704
commit
8eb18cd5ae
1 changed files with 9 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue