Tweak engine startup, shorten initial silence timeout
see also 23baeee829
This commit is contained in:
parent
8ea608b3d9
commit
daf9fe2550
@ -726,7 +726,7 @@ AudioEngine::set_session (Session *s)
|
|||||||
SessionHandlePtr::set_session (s);
|
SessionHandlePtr::set_session (s);
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
_init_countdown = std::max (8, (int)(_backend->sample_rate () / _backend->buffer_size ()) / 4);
|
_init_countdown = std::max (4, (int)(_backend->sample_rate () / _backend->buffer_size ()) / 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1733,8 +1733,8 @@ AlsaAudioBackend::main_process_thread ()
|
|||||||
|
|
||||||
const double sr_norm = 1e-6 * (double) _samplerate / (double)_samples_per_period;
|
const double sr_norm = 1e-6 * (double) _samplerate / (double)_samples_per_period;
|
||||||
|
|
||||||
/* warm up */
|
/* warm up freewheel dry-run - see also AudioEngine _init_countdown */
|
||||||
int cnt = std::max (8, (int)(_samplerate / _samples_per_period) / 2);
|
int cnt = std::max (4, (int)(_samplerate / _samples_per_period) / 8);
|
||||||
for (int w = 0; w < cnt; ++w) {
|
for (int w = 0; w < cnt; ++w) {
|
||||||
for (std::vector<BackendPortPtr>::const_iterator it = _system_inputs.begin (); it != _system_inputs.end (); ++it) {
|
for (std::vector<BackendPortPtr>::const_iterator it = _system_inputs.begin (); it != _system_inputs.end (); ++it) {
|
||||||
memset ((*it)->get_buffer (_samples_per_period), 0, _samples_per_period * sizeof (Sample));
|
memset ((*it)->get_buffer (_samples_per_period), 0, _samples_per_period * sizeof (Sample));
|
||||||
|
Loading…
Reference in New Issue
Block a user