summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-27 19:43:34 +0200
committerRobin Gareus <robin@gareus.org>2017-04-27 19:43:34 +0200
commitc25640f3364478e91c135936644f264f143f1f43 (patch)
tree1816a56a6bb3ccaa853b421cc335b271dc33a518 /libs/ardour/audioengine.cc
parent410f94cf1b9c647c869d1cdd2b7e6fc415ebe0d0 (diff)
Fix flow for latency measurements that needs an engine stop.
Make AudioEngine::prepare_for_latency_measurement() idempotent. There are multple calls (when switching to the measurement page and every time a measurement is preformed). Also the Stopped() signal is important for the Dialog state regardless if the engine was stopped for latency or not.
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 96445b5973..1a09a7f0eb 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -956,7 +956,7 @@ AudioEngine::stop (bool for_latency)
Port::PortDrop ();
}
- if (!for_latency && stop_engine) {
+ if (stop_engine) {
Stopped (); /* EMIT SIGNAL */
}
@@ -1331,6 +1331,10 @@ AudioEngine::prepare_for_latency_measurement ()
return -1;
}
+ if (running() && _started_for_latency) {
+ return 0;
+ }
+
if (_backend->can_change_systemic_latency_when_running()) {
if (start()) {
return -1;