From fe56c5931cccb7c7e9de4d8f9f31353ff6efed88 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 28 Oct 2019 13:39:59 -0600 Subject: [PATCH] do not hold a lock when calling AudioEngine::update_latencies() from Session::update_latency_compensation(). Only when using JACK1 is ::update_latencies() a synchronous call (ending up in Session::update_latency() which tries to take the same lock). But the semantics of ::update_latencies() are sufficiently ill-defined that entering that call with a lock held seems like a bad idea, so we release the lock unconditionally here. --- libs/ardour/session.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index b4d1f04a9c..75838dd8fe 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -6514,6 +6514,8 @@ Session::update_latency_compensation (bool force_whole_graph) if (some_track_latency_changed || force_whole_graph) { DEBUG_TRACE (DEBUG::LatencyCompensation, "update_latency_compensation: delegate to engine\n"); + /* cannot hold lock while engine initiates a full latency callback */ + lx.release (); _engine.update_latencies (); /* above call will ask the backend up update its latencies, which * eventually will trigger AudioEngine::latency_callback () and