Reset DSP load on backend re-start and after freewheeling

This commit is contained in:
Robin Gareus 2020-03-30 16:58:55 +02:00
parent 27b2794133
commit a8ff35accb
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 13 additions and 0 deletions

View file

@ -708,6 +708,7 @@ CoreAudioBackend::_start (bool for_latency_measurement)
_port_change_flag = true;
pre_process ();
_dsp_load_calc.reset ();
// all systems go.
_pcmio->set_xrun_callback (xrun_callback_ptr, this);
_preinit = false;
@ -1797,6 +1798,7 @@ CoreAudioBackend::process_callback (const uint32_t n_samples, const uint64_t hos
if (!_run || _freewheel || _preinit) {
// NB if we return 1, the output is
// zeroed by the coreaudio callback
_dsp_load_calc.reset ();
return 1;
}