Commit Diff
- Commit:
440c29a48baee8e864752653f5cca6ea842cfd1e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- alsa: handle xrun due to pausing amused implements pausing as not sending audio at all until resuming, i.e. by doing an underrun. ALSA is more strict than sndio, by default at least, and so we need to call snd_pcm_recover() before we can play again.
- Actions:
- Patch | Tree
--- audio_alsa.c +++ audio_alsa.c @@ -126,7 +126,8 @@ audio_write(const void *buf, size_t len) avail = snd_pcm_avail_update(pcm); if (avail < 0) { if (avail == -EPIPE) { - log_warnx("alsa xrun occurred"); + log_debug("alsa xrun occurred"); + snd_pcm_recover(pcm, -EPIPE, 1); return 0; } log_warnx("snd_pcm_avail_update failure: %s",