summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-01-06 22:55:20 -0800
committerChris Robinson <[email protected]>2010-01-06 22:55:20 -0800
commit64ac3a4739ae2327a3a0ce9d40e53a9b661042e2 (patch)
tree6803f3856f2b3399e54199fd74d84aa2bebe52b9 /Alc
parentc90616b963ed321d8e3e0cfb5a57c80c6637d58a (diff)
Use snd_pcm_recover in more places
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alsa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index b9bb6259..d33c87ce 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -362,10 +362,9 @@ static ALuint ALSANoMMapProc(ALvoid *ptr)
case -EAGAIN:
continue;
case -ESTRPIPE:
- while((ret=psnd_pcm_resume(data->pcmHandle)) == -EAGAIN)
- Sleep(1);
- break;
case -EPIPE:
+ case -EINTR:
+ ret = psnd_pcm_recover(data->pcmHandle, ret, 1);
break;
default:
if (ret >= 0)
@@ -412,10 +411,9 @@ static ALuint ALSANoMMapCaptureProc(ALvoid *ptr)
case -EAGAIN:
continue;
case -ESTRPIPE:
- while((avail=psnd_pcm_resume(data->pcmHandle)) == -EAGAIN)
- Sleep(1);
- break;
case -EPIPE:
+ case -EINTR:
+ avail = psnd_pcm_recover(data->pcmHandle, avail, 1);
break;
default:
if (avail >= 0 && data->doCapture)