diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 9bb7126a15..c39a8ea4c2 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4378,7 +4378,7 @@ Route::update_signal_latency (bool apply_to_delayline, bool* delayline_update_ne * Since the output is not used, Send::_thru_delay is not relevant, and * Send->effective_latency () should return zero. */ - if (is_master() || output_effectively_connected ()) { + if (is_master() || is_monitor () || output_effectively_connected ()) { _output_latency = _output->latency (); } else if (_session.master_out ()) { /* We cannot use `_session.master_out()->input()->latency()` because that would return capture latency. diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 8a63e451ae..d19d11b13a 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -6922,7 +6922,6 @@ Session::update_latency (bool playback) /* prevent any concurrent latency updates */ Glib::Threads::Mutex::Lock lx (_update_latency_lock); - set_worst_output_latency (); update_route_latency (true, /*apply_to_delayline*/ true, NULL); /* release before emitting signals */ @@ -6932,7 +6931,6 @@ Session::update_latency (bool playback) /* process lock is not needed to update worst-case latency */ lm.release (); Glib::Threads::Mutex::Lock lx (_update_latency_lock); - set_worst_input_latency (); update_route_latency (false, false, NULL); } @@ -6947,6 +6945,14 @@ Session::update_latency (bool playback) /* now handle non-route ports that we are responsible for */ set_owned_port_public_latency (playback); + if (playback) { + Glib::Threads::Mutex::Lock lx (_update_latency_lock); + set_worst_output_latency (); + } else { + Glib::Threads::Mutex::Lock lx (_update_latency_lock); + set_worst_input_latency (); + } + DEBUG_TRACE (DEBUG::LatencyCompensation, "Engine latency callback: DONE\n"); LatencyUpdated (playback); /* EMIT SIGNAL */