mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa-pcm: ignore error after recover
If we get an error after receovering, ignore it and assume we filled the buffer completely. We need to do this or otherwise we stop the timer and audio stops.
This commit is contained in:
parent
195ac82394
commit
9613f16caf
1 changed files with 5 additions and 2 deletions
|
|
@ -612,8 +612,11 @@ static int get_status(struct state *state, snd_pcm_uframes_t *delay, snd_pcm_ufr
|
|||
if ((avail = snd_pcm_avail(state->hndl)) < 0) {
|
||||
if ((res = alsa_recover(state, avail)) < 0)
|
||||
return res;
|
||||
if ((avail = snd_pcm_avail(state->hndl)) < 0)
|
||||
return avail;
|
||||
if ((avail = snd_pcm_avail(state->hndl)) < 0) {
|
||||
spa_log_warn(state->log, NAME" %p: snd_pcm_avail after recover: %s",
|
||||
state, snd_strerror(avail));
|
||||
avail = state->threshold * 2;
|
||||
}
|
||||
} else {
|
||||
state->alsa_recovering = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue