diff options
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/latent.h | 5 | ||||
-rw-r--r-- | libs/ardour/latent.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session.cc | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h index 8135d2d45e..0e34d3c81a 100644 --- a/libs/ardour/ardour/latent.h +++ b/libs/ardour/ardour/latent.h @@ -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: diff --git a/libs/ardour/latent.cc b/libs/ardour/latent.cc index 04c8affb59..c31b1ec545 100644 --- a/libs/ardour/latent.cc +++ b/libs/ardour/latent.cc @@ -23,6 +23,7 @@ using namespace ARDOUR; bool ARDOUR::Latent::_zero_latency = false; +PBD::Signal0<void> Latent::DisableSwitchChanged; Latent::Latent () : HasLatency () diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 2848cd682a..6db282c1eb 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -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 (); |