13
0

ALSA: fix adding n_period playback latency

Use playback port, not capture port.
This commit is contained in:
Robin Gareus 2023-06-17 00:53:22 +02:00
parent 7b1da19581
commit 639696c1a8
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -520,12 +520,12 @@ AlsaAudioBackend::update_systemic_audio_latencies ()
const uint32_t lcpp = (_periods_per_cycle - 2) * _samples_per_period;
LatencyRange lr;
lr.min = lr.max = (_measure_latency ? 0 : _systemic_audio_output_latency);
lr.min = lr.max = lcpp + (_measure_latency ? 0 : _systemic_audio_output_latency);
for (std::vector<BackendPortPtr>::const_iterator it = _system_outputs.begin (); it != _system_outputs.end (); ++it) {
set_latency_range (*it, true, lr);
}
lr.min = lr.max = lcpp + (_measure_latency ? 0 : _systemic_audio_input_latency);
lr.min = lr.max = (_measure_latency ? 0 : _systemic_audio_input_latency);
for (std::vector<BackendPortPtr>::const_iterator it = _system_inputs.begin (); it != _system_inputs.end (); ++it) {
set_latency_range (*it, false, lr);
}