summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-10-20 10:24:39 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-20 10:25:36 -0400
commit6ec32a70c14f4aba6821e57ce0b139de6be51aa8 (patch)
treecf24f69e25e402a7faae25d5fc4f058e4f835bc3
parentac008dac028cf86970c2b2604480beb87880e578 (diff)
fix AudioUnit parameter listening to work with new ParameterChangedExternally semantics
-rw-r--r--libs/ardour/audio_unit.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 045669b29b..e8f7e0a1ed 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -924,7 +924,8 @@ AUPlugin::set_parameter (uint32_t which, float val)
theEvent.mArgument.mParameter.mElement = d.element;
DEBUG_TRACE (DEBUG::AudioUnits, "notify about parameter change\n");
- AUEventListenerNotify (NULL, this, &theEvent);
+ /* Note the 1st argument, which means "Don't notify us about a change we made ourselves" */
+ AUEventListenerNotify (_parameter_listener, NULL, &theEvent);
Plugin::set_parameter (which, val);
}
@@ -3094,12 +3095,10 @@ AUPlugin::parameter_change_listener (void* /*arg*/, void* src, const AudioUnitEv
EndTouch (i->second);
break;
case kAudioUnitEvent_ParameterValueChange:
- if (src != this) {
- std::cerr << "something changed " << i->second << " to " << new_value << std::endl;
- ParameterChangedExternally (i->second, new_value);
- } else {
- std::cerr << "plugin changed " << i->second << " ignore it\n";
- }
+ /* whenever we change a parameter, we request that we are NOT notified of the change, so anytime we arrive here, it
+ means that something else (i.e. the plugin GUI) made the change.
+ */
+ ParameterChangedExternally (i->second, new_value);
break;
default:
break;