Fix Latency Measurement without device re-start
This handles a case when the engine was started normally (not for latency measurement), and measurement is performed later. This resulted in a duplicate backend start
This commit is contained in:
parent
4d2ccdd905
commit
467795f467
@ -898,6 +898,10 @@ AudioEngine::start (bool for_latency)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (_running && _backend->can_change_systemic_latency_when_running()) {
|
||||
_started_for_latency = for_latency;
|
||||
}
|
||||
|
||||
if (_running) {
|
||||
return 0;
|
||||
}
|
||||
@ -963,7 +967,7 @@ AudioEngine::stop (bool for_latency)
|
||||
|
||||
if (for_latency && _backend->can_change_systemic_latency_when_running()) {
|
||||
stop_engine = false;
|
||||
if (_running) {
|
||||
if (_running && _started_for_latency) {
|
||||
_backend->start (false); // keep running, reload latencies
|
||||
}
|
||||
} else {
|
||||
|
@ -110,7 +110,6 @@ Graph::reset_thread_list ()
|
||||
|
||||
/* For now, we shouldn't be using the graph code if we only have 1 DSP thread */
|
||||
assert (num_threads > 1);
|
||||
assert (AudioEngine::instance ()->process_thread_count () == n_workers);
|
||||
|
||||
/* don't bother doing anything here if we already have the right
|
||||
* number of threads.
|
||||
|
Loading…
Reference in New Issue
Block a user