diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-11 10:06:02 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-11 10:06:02 -0400 |
commit | 7c3535ebf808056f65df50a38c7b2202ca1e27aa (patch) | |
tree | 6b2d043e6589b30a1b7c975083dfae3a02e67824 /libs/ardour/audioengine.cc | |
parent | 7c719e441a834067c1b35e51f891fd4c1a252e76 (diff) |
make quit work even when latency measurement is in progress
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r-- | libs/ardour/audioengine.cc | 16 |
1 files 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) { |