From 7c3535ebf808056f65df50a38c7b2202ca1e27aa Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 11 Sep 2013 10:06:02 -0400 Subject: [PATCH] make quit work even when latency measurement is in progress --- libs/ardour/audioengine.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 249fd4200d..2a1ca2c852 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -198,11 +198,11 @@ AudioEngine::process_callback (pframes_t nframes) return 0; } - /* If measuring latency, do it now and get out of here */ + bool return_after_remove_check = false; if (_measuring_latency && _mtdm) { - // PortManager::cycle_start (nframes); - // PortManager::silence (nframes); + PortManager::cycle_start (nframes); + PortManager::silence (nframes); if (_latency_input_port && _latency_output_port) { PortEngine& pe (port_engine()); @@ -213,8 +213,8 @@ AudioEngine::process_callback (pframes_t nframes) _mtdm->process (nframes, in, out); } - // PortManager::cycle_end (nframes); - return 0; + PortManager::cycle_end (nframes); + return_after_remove_check = true; } else if (_latency_flush_frames) { @@ -232,7 +232,7 @@ AudioEngine::process_callback (pframes_t nframes) _latency_flush_frames = 0; } - return 0; + return_after_remove_check = true; } if (session_remove_pending) { @@ -271,6 +271,10 @@ AudioEngine::process_callback (pframes_t nframes) } } + if (return_after_remove_check) { + return 0; + } + if (_session == 0) { if (!_freewheeling) {