From 1b9c90f6d3b365076c659e67fea5267db826be67 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 12 Oct 2007 09:45:16 +0000 Subject: [PATCH] --- .../wrapper/formats/VST/juce_VstWrapper.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp index ab6414a821..49db35fad6 100644 --- a/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp @@ -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