Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
1b9c90f6d3
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp

+ 12
- 1
extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp View File

@@ -721,7 +721,7 @@ public:
// any inputs where the output channel is disabled will need our own internal dummy
// buffer, because we can't rely on the host to supply different buffers for each channel
for (int i = 0; i < JucePlugin_MaxNumOutputChannels; ++i)
if (! isOutputConnected (i))
if (! isOutputConnected2 (i))
tempChannels.set (i, juce_malloc (sizeof (float) * blockSize * 2));
filter->prepareToPlay (rate, blockSize);
@@ -1384,6 +1384,17 @@ private:
return host;
}
// this is a dupe of the method in AudioEffect, because some SDKs
// don't seem to include it..
bool isOutputConnected2 (VstInt32 output)
{
VstInt32 ret = 0;
if (audioMaster)
ret = (VstInt32) audioMaster (&cEffect, audioMasterPinConnected, output, 1, 0, 0);
return ret ? false : true;
}
#if JUCE_MAC
WindowRef hostWindow;
#elif JUCE_LINUX


Loading…
Cancel
Save