mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Added a flag JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING which can be used to avoid sanity-checks on plugin parameter gestures
This commit is contained in:
parent
90c88ec416
commit
dccd4f0393
2 changed files with 4 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ private:
|
|||
OwnedArray<AudioProcessorParameter> managedParameters;
|
||||
AudioProcessorParameter* getParamChecked (int) const noexcept;
|
||||
|
||||
#if JUCE_DEBUG
|
||||
#if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
|
||||
BigInteger changingParams;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue