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.
This commit is contained in:
parent
410f94cf1b
commit
c25640f336
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user