Mercurial > audlegacy-plugins
changeset 1934:c62011e48c61
alsa_recovery(): some bugfixes.
also add a XXX on a g_usleep which seems bad
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Mon, 01 Oct 2007 14:06:03 -0500 |
parents | 725b5f3f0242 |
children | a55b1c903628 |
files | src/alsa/audio.c |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alsa/audio.c Sun Sep 30 21:34:41 2007 +0200 +++ b/src/alsa/audio.c Mon Oct 01 14:06:03 2007 -0500 @@ -158,7 +158,8 @@ */ switch (err) { - case -ESTRPIPE: /* "suspend": wait until ALSA is "running" again. */ + case -ESTRPIPE: + case ESTRPIPE: /* "suspend": wait until ALSA is "running" again. */ while ((err2 = snd_pcm_resume(alsa_pcm)) == -EAGAIN) g_usleep(100000); @@ -167,10 +168,15 @@ break; - case -EPIPE: /* under-run and the I/O pipe closed on us */ + case -EPIPE: + case EPIPE: /* under-run and the I/O pipe closed on us */ return snd_pcm_prepare(alsa_pcm); break; + case EINTR: + case -EINTR: + break; + default: g_warning("Unhandled ALSA exception code %d (%s), trying hard restart.", err, snd_strerror(err)); return snd_pcm_prepare(alsa_pcm); @@ -701,7 +707,7 @@ alsa_recovery(wr); } } - else + else /* XXX: why is this here? --nenolod */ g_usleep(10000); if (pause_request != paused)