Emit signal when plugin latency changes

This commit is contained in:
Robin Gareus
2019-02-17 02:22:03 +01:00
parent 2ec28f3ce7
commit 6d7bc4ea30
2 changed files with 8 additions and 1 deletions

View File

@@ -20,6 +20,8 @@
#ifndef __ardour_latent_h__
#define __ardour_latent_h__
#include "pbd/signals.h"
#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
@@ -76,6 +78,8 @@ public:
return _zero_latency;
}
PBD::Signal0<void> LatencyChanged;
protected:
int set_state (const XMLNode& node, int version);
void add_state (XMLNode*) const;

View File

@@ -3184,7 +3184,10 @@ PluginInsert::latency_changed ()
{
// this is called in RT context, LatencyChanged is emitted after run()
_latency_changed = true;
// XXX This also needs a proper API not an owner() hack.
LatencyChanged (); /* EMIT SIGNAL */
// XXX This needs a proper API not an owner() hack:
// TODO Route should subscribe to LatencyChanged() and forward it
// to the session as processor_latency_changed.
assert (owner ());
static_cast<Route*>(owner ())->processor_latency_changed (); /* EMIT SIGNAL */
}