aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-14 13:23:49 -0800
committerChris Robinson <[email protected]>2008-01-14 13:23:49 -0800
commitd9ef062cafbac12dbb25fe3c58efdf1b53525ff2 (patch)
tree3157cf9e96b3473c1e842ef0a56a84927c44321e /Alc/alsa.c
parent2b8ce3b4cf87023045e0fd6c8477d45b06bff101 (diff)
Avoid busy waiting when waiting for suspend to clear
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index e5881e55..f661d76b 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -248,9 +248,8 @@ static ALuint ALSANoMMapProc(ALvoid *ptr)
case -EAGAIN:
continue;
case -ESTRPIPE:
- do {
- ret = psnd_pcm_resume(data->pcmHandle);
- } while(ret == -EAGAIN);
+ while((ret=psnd_pcm_resume(data->pcmHandle)) == -EAGAIN)
+ Sleep(1);
break;
case -EPIPE:
break;