From 2f878e518bb51b55b50cd650000285412aab8e2c Mon Sep 17 00:00:00 2001 From: Oleg Prokhorov Date: Tue, 14 Oct 2003 05:18:40 +0000 Subject: [PATCH] Small fix in sound flushing code. --- dlls/winmm/winealsa/audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index 194fdfc8d21..d2f0af29b7b 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -845,6 +845,9 @@ void wait_for_poll(snd_pcm_t *handle, struct pollfd *ufds, unsigned int count) { unsigned short revents; + if (snd_pcm_state(handle) != SND_PCM_STATE_RUNNING) + return; + while (1) { poll(ufds, count, -1); snd_pcm_poll_descriptors_revents(handle, ufds, count, &revents);