|
|
@@ -724,6 +724,8 @@ public: |
|
|
|
|
|
|
|
|
ComponentResult RestoreState (CFPropertyListRef inData) override
|
|
|
ComponentResult RestoreState (CFPropertyListRef inData) override
|
|
|
{
|
|
|
{
|
|
|
|
|
|
const ScopedValueSetter<bool> scope { restoringState, true };
|
|
|
|
|
|
|
|
|
{
|
|
|
{
|
|
|
// Remove the data entry from the state to prevent the superclass loading the parameters
|
|
|
// Remove the data entry from the state to prevent the superclass loading the parameters
|
|
|
CFUniquePtr<CFMutableDictionaryRef> copyWithoutData (CFDictionaryCreateMutableCopy (nullptr, 0, (CFDictionaryRef) inData));
|
|
|
CFUniquePtr<CFMutableDictionaryRef> copyWithoutData (CFDictionaryCreateMutableCopy (nullptr, 0, (CFDictionaryRef) inData));
|
|
|
@@ -1151,6 +1153,9 @@ public: |
|
|
|
|
|
|
|
|
void sendAUEvent (const AudioUnitEventType type, const int juceParamIndex)
|
|
|
void sendAUEvent (const AudioUnitEventType type, const int juceParamIndex)
|
|
|
{
|
|
|
{
|
|
|
|
|
|
if (restoringState)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
auEvent.mEventType = type;
|
|
|
auEvent.mEventType = type;
|
|
|
auEvent.mArgument.mParameter.mParameterID = getAUParameterIDForIndex (juceParamIndex);
|
|
|
auEvent.mArgument.mParameter.mParameterID = getAUParameterIDForIndex (juceParamIndex);
|
|
|
AUEventListenerNotify (nullptr, nullptr, &auEvent);
|
|
|
AUEventListenerNotify (nullptr, nullptr, &auEvent);
|
|
|
@@ -1186,7 +1191,8 @@ public: |
|
|
// this will only ever be called by the bypass parameter
|
|
|
// this will only ever be called by the bypass parameter
|
|
|
void parameterValueChanged (int, float) override
|
|
|
void parameterValueChanged (int, float) override
|
|
|
{
|
|
|
{
|
|
|
PropertyChanged (kAudioUnitProperty_BypassEffect, kAudioUnitScope_Global, 0);
|
|
|
|
|
|
|
|
|
if (! restoringState)
|
|
|
|
|
|
PropertyChanged (kAudioUnitProperty_BypassEffect, kAudioUnitScope_Global, 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void parameterGestureChanged (int, bool) override {}
|
|
|
void parameterGestureChanged (int, bool) override {}
|
|
|
@@ -1811,7 +1817,7 @@ private: |
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
AudioUnitHelpers::CoreAudioBufferList audioBuffer;
|
|
|
AudioUnitHelpers::CoreAudioBufferList audioBuffer;
|
|
|
MidiBuffer midiEvents, incomingEvents;
|
|
|
MidiBuffer midiEvents, incomingEvents;
|
|
|
bool prepared = false, isBypassed = false;
|
|
|
|
|
|
|
|
|
bool prepared = false, isBypassed = false, restoringState = false;
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
#if JUCE_FORCE_USE_LEGACY_PARAM_IDS
|
|
|
#if JUCE_FORCE_USE_LEGACY_PARAM_IDS
|
|
|
|