summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/audioengine.cc16
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) {