From dccd4f03936ee09f30c20a4eed7aab28f7c73033 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 24 Mar 2015 09:13:10 +0000 Subject: [PATCH] Added a flag JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING which can be used to avoid sanity-checks on plugin parameter gestures --- .../processors/juce_AudioProcessor.cpp | 6 +++--- .../juce_audio_processors/processors/juce_AudioProcessor.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index d971a67762..0dda683caa 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -48,7 +48,7 @@ AudioProcessor::~AudioProcessor() // that it refers to is deleted.. jassert (activeEditor == nullptr); - #if JUCE_DEBUG + #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING // This will fail if you've called beginParameterChangeGesture() for one // or more parameters without having made a corresponding call to endParameterChangeGesture... jassert (changingParams.countNumberOfSetBits() == 0); @@ -142,7 +142,7 @@ void AudioProcessor::beginParameterChangeGesture (int parameterIndex) { if (isPositiveAndBelow (parameterIndex, getNumParameters())) { - #if JUCE_DEBUG + #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING // This means you've called beginParameterChangeGesture twice in succession without a matching // call to endParameterChangeGesture. That might be fine in most hosts, but better to avoid doing it. jassert (! changingParams [parameterIndex]); @@ -163,7 +163,7 @@ void AudioProcessor::endParameterChangeGesture (int parameterIndex) { if (isPositiveAndBelow (parameterIndex, getNumParameters())) { - #if JUCE_DEBUG + #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING // This means you've called endParameterChangeGesture without having previously called // beginParameterChangeGesture. That might be fine in most hosts, but better to keep the // calls matched correctly. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index ea81339765..ae6ff71a9d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -682,7 +682,7 @@ private: OwnedArray managedParameters; AudioProcessorParameter* getParamChecked (int) const noexcept; - #if JUCE_DEBUG + #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING BigInteger changingParams; #endif