From d9ef062cafbac12dbb25fe3c58efdf1b53525ff2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 14 Jan 2008 13:23:49 -0800 Subject: [PATCH] Avoid busy waiting when waiting for suspend to clear --- Alc/alsa.c | 5 ++--- 1 file 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; -- 2.11.4.GIT