summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-16 16:21:12 +0200
committerRobin Gareus <robin@gareus.org>2020-04-16 16:47:08 +0200
commitdaf9fe25509de4360296f711ad0359b01750f70f (patch)
tree98e3e8c2fb1a28b3bd118b75a4436909c85ef84b
parent8ea608b3d9590eb2e2f4faf5581e323880621736 (diff)
Tweak engine startup, shorten initial silence timeout
see also 23baeee8293
-rw-r--r--libs/ardour/audioengine.cc2
-rw-r--r--libs/backends/alsa/alsa_audiobackend.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index db6956c08a..db13861bbc 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -726,7 +726,7 @@ AudioEngine::set_session (Session *s)
SessionHandlePtr::set_session (s);
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);
}
}
diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc
index 5d07bc1419..86d3d0e8ba 100644
--- a/libs/backends/alsa/alsa_audiobackend.cc
+++ b/libs/backends/alsa/alsa_audiobackend.cc
@@ -1733,8 +1733,8 @@ AlsaAudioBackend::main_process_thread ()
const double sr_norm = 1e-6 * (double) _samplerate / (double)_samples_per_period;
- /* warm up */
- int cnt = std::max (8, (int)(_samplerate / _samples_per_period) / 2);
+ /* warm up freewheel dry-run - see also AudioEngine _init_countdown */
+ int cnt = std::max (4, (int)(_samplerate / _samples_per_period) / 8);
for (int w = 0; w < cnt; ++w) {
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));