ao_alsa: check for EAGAIN too

Simply retry on EAGAIN.

I've seen this in several other projects; it might be just cargo-culting
though.
This commit is contained in:
wm4 2014-11-17 20:07:59 +01:00
parent 8b2798cb3e
commit fb86750a67
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ static int play(struct ao *ao, void **data, int samples, int flags)
res = snd_pcm_writei(p->alsa, data[0], samples);
}
if (res == -EINTR) {
if (res == -EINTR || res == -EAGAIN) {
/* nothing to do */
res = 0;
} else if (res == -ESTRPIPE) { /* suspend */