summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/plugin.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-08 18:16:01 +0200
committerRobin Gareus <robin@gareus.org>2016-04-08 18:16:01 +0200
commit752662051a1d7217ce842ded78d1ee8e041a112f (patch)
tree019ab4d6d311648969f193992fccd1bc97502249 /libs/ardour/ardour/plugin.h
parent75273762976933841b5c0b244c4e8f29158e5519 (diff)
add Plugin LatencyChanged() signal and max latency report
Diffstat (limited to 'libs/ardour/ardour/plugin.h')
-rw-r--r--libs/ardour/ardour/plugin.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index e219ec5bdd..087f5968bd 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -199,6 +199,26 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
return 0;
}
+ /** Emitted when a Latency Changes
+ *
+ * (this cannot be part of ARDOUR::Latent because
+ * signals cannot be copy-constructed).
+ */
+ PBD::Signal2<void,framecnt_t, framecnt_t> LatencyChanged;
+
+ /* overload Latent::set_user_latency w/signal emission */
+ virtual void set_user_latency (framecnt_t val) {
+ bool changed = val != _user_latency;
+ framecnt_t old = effective_latency ();
+ _user_latency = val;
+ if (changed) {
+ LatencyChanged (old, effective_latency ()); /* EMIT SIGNAL */
+ }
+ }
+
+ /** the max possible latency a plugin will have */
+ virtual framecnt_t max_latency () const { return 0; } // TODO = 0, require implementation
+
/** Emitted when a preset is added or removed, respectively */
PBD::Signal0<void> PresetAdded;
PBD::Signal0<void> PresetRemoved;