From 90b948dffd0d5a21399bc5234bbc188fca84f735 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 7 Aug 2025 16:18:25 +0100 Subject: [PATCH] AudioProcessor: Remove deprecated functions --- .../processors/juce_AudioProcessor.cpp | 91 ------------------- .../processors/juce_AudioProcessor.h | 6 -- 2 files changed, 97 deletions(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index a28e46aa5e..37eb89016a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -1278,97 +1278,6 @@ VST3ClientExtensions* AudioProcessor::getVST3ClientExtensions() //============================================================================== JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS -void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newValue) -{ - if (auto* param = getParameters()[parameterIndex]) - { - param->setValueNotifyingHost (newValue); - } - else if (isPositiveAndBelow (parameterIndex, getNumParameters())) - { - setParameter (parameterIndex, newValue); - sendParamChangeMessageToListeners (parameterIndex, newValue); - } -} - -void AudioProcessor::sendParamChangeMessageToListeners (int parameterIndex, float newValue) -{ - if (auto* param = getParameters()[parameterIndex]) - { - param->sendValueChangedMessageToListeners (newValue); - } - else - { - if (isPositiveAndBelow (parameterIndex, getNumParameters())) - { - for (int i = listeners.size(); --i >= 0;) - if (auto* l = getListenerLocked (i)) - l->audioProcessorParameterChanged (this, parameterIndex, newValue); - } - else - { - jassertfalse; // called with an out-of-range parameter index! - } - } -} - -void AudioProcessor::beginParameterChangeGesture (int parameterIndex) -{ - if (auto* param = getParameters()[parameterIndex]) - { - param->beginChangeGesture(); - } - else - { - if (isPositiveAndBelow (parameterIndex, getNumParameters())) - { - #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]); - changingParams.setBit (parameterIndex); - #endif - - for (int i = listeners.size(); --i >= 0;) - if (auto* l = getListenerLocked (i)) - l->audioProcessorParameterChangeGestureBegin (this, parameterIndex); - } - else - { - jassertfalse; // called with an out-of-range parameter index! - } - } -} - -void AudioProcessor::endParameterChangeGesture (int parameterIndex) -{ - if (auto* param = getParameters()[parameterIndex]) - { - param->endChangeGesture(); - } - else - { - if (isPositiveAndBelow (parameterIndex, getNumParameters())) - { - #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. - jassert (changingParams[parameterIndex]); - changingParams.clearBit (parameterIndex); - #endif - - for (int i = listeners.size(); --i >= 0;) - if (auto* l = getListenerLocked (i)) - l->audioProcessorParameterChangeGestureEnd (this, parameterIndex); - } - else - { - jassertfalse; // called with an out-of-range parameter index! - } - } -} - String AudioProcessor::getParameterName (int index, int maximumStringLength) { if (auto* p = getParameters()[index]) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 00df5b2f7b..c9a86be43c 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1483,9 +1483,6 @@ protected: /** @internal */ std::atomic playHead { nullptr }; - /** @internal */ - void sendParamChangeMessageToListeners (int parameterIndex, float newValue); - public: /** @cond */ // These methods are all deprecated in favour of using AudioProcessorParameter @@ -1506,9 +1503,6 @@ public: [[deprecated]] virtual bool isParameterAutomatable (int parameterIndex) const; [[deprecated]] virtual bool isMetaParameter (int parameterIndex) const; [[deprecated]] virtual AudioProcessorParameter::Category getParameterCategory (int parameterIndex) const; - [[deprecated]] void beginParameterChangeGesture (int parameterIndex); - [[deprecated]] void endParameterChangeGesture (int parameterIndex); - [[deprecated]] void setParameterNotifyingHost (int parameterIndex, float newValue); // These functions are deprecated: your audio processor can inform the host // on its bus and channel layouts and names using the AudioChannelSet and various bus classes.