Add Signal to indicate global delay compensation status

This commit is contained in:
Robin Gareus 2019-09-28 20:53:50 +02:00
parent fa7c4718e8
commit 430dae6250
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 7 additions and 0 deletions

View File

@ -73,13 +73,18 @@ public:
}
static void force_zero_latency (bool en) {
if (_zero_latency == en) {
return;
}
_zero_latency = en;
DisableSwitchChanged (); /* EMIT SIGNAL */
}
static bool zero_latency () {
return _zero_latency;
}
static PBD::Signal0<void> DisableSwitchChanged;
PBD::Signal0<void> LatencyChanged;
protected:

View File

@ -23,6 +23,7 @@
using namespace ARDOUR;
bool ARDOUR::Latent::_zero_latency = false;
PBD::Signal0<void> Latent::DisableSwitchChanged;
Latent::Latent ()
: HasLatency ()

View File

@ -449,6 +449,7 @@ Session::Session (AudioEngine &eng,
EndTimeChanged.connect_same_thread (*this, boost::bind (&Session::end_time_changed, this, _1));
LatentSend::ChangedLatency.connect_same_thread (*this, boost::bind (&Session::send_latency_compensation_change, this));
Latent::DisableSwitchChanged.connect_same_thread (*this, boost::bind (&Session::queue_latency_recompute, this));
emit_thread_start ();
auto_connect_thread_start ();