summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/plugin.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-10-20 09:07:51 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-20 09:07:58 -0400
commit336b2eb9a4a8634bae84a15e952d20335aa28c12 (patch)
treeab171341dd5ab7915ae77c937673ae586116ecb9 /libs/ardour/ardour/plugin.h
parentf1a6d7816d13d3eca5885494f711b88a8270c899 (diff)
rename ParameterChanged signal in Plugin to ParameterChangedExternally to reflect its intent, and clean up the result.
The signal exists to notify listeners that something outside of the host's control (e.g. a plugin's own GUI for AU or VST) has modified a plugin parameter. Previous code had strange feedback loops and ambiguous semantics. Significant modification of LV2 GUI updating was required. Still to be tested for feedback loop issues: AudioUnits
Diffstat (limited to 'libs/ardour/ardour/plugin.h')
-rw-r--r--libs/ardour/ardour/plugin.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 2554a6816c..7bef40ab88 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -208,10 +208,17 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
/** Emitted when a preset has been loaded */
PBD::Signal0<void> PresetLoaded;
+ /** Emitted when a parameter is altered in a way that may have
+ * changed the settings with respect to any loaded preset.
+ */
+ PBD::Signal0<void> PresetDirty;
+
virtual bool has_editor () const = 0;
- /** Emitted when any parameter changes */
- PBD::Signal2<void, uint32_t, float> ParameterChanged;
+ /** Emitted when a parameter is altered by something outside of our
+ * control, most typically a Plugin GUI/editor
+ */
+ PBD::Signal2<void, uint32_t, float> ParameterChangedExternally;
virtual bool configure_io (ChanCount /*in*/, ChanCount /*out*/) { return true; }
@@ -272,9 +279,18 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
protected:
friend class PluginInsert;
+ friend class Session;
+ /* Called when a parameter of the plugin is changed outside of this
+ * host's control (typical via a plugin's own GUI/editor)
+ */
+ void parameter_changed_externally (uint32_t which, float val);
+
+ /* should be overridden by plugin API specific derived types to
+ * actually implement changing the parameter. The derived type should
+ * call this after the change is made.
+ */
virtual void set_parameter (uint32_t which, float val);
- virtual void set_parameter_automated (uint32_t which, float val);
/** Do the actual saving of the current plugin settings to a preset of the provided name.
* Should return a URI on success, or an empty string on failure.