mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: use rewind to remove excess delay
When the delay is too big, rewind a little to reduce it when resync.
This commit is contained in:
parent
5b9ec53bf8
commit
4246961070
1 changed files with 1 additions and 1 deletions
|
|
@ -1889,7 +1889,7 @@ int spa_alsa_write(struct state *state)
|
|||
spa_log_warn(state->log, "%s: follower delay:%ld target:%ld thr:%u, resync",
|
||||
state->props.device, delay, target, state->threshold);
|
||||
if (delay > target)
|
||||
max_write = delay - target;
|
||||
snd_pcm_rewind(state->hndl, delay - target);
|
||||
else if (delay < target)
|
||||
spa_alsa_silence(state, target - delay);
|
||||
delay = target;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue