Commit 2cec4f45 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

wait_for_poll can go into an infinite loop. Remove it and replace it

with snd_pcm_drain which is more likely to do what the original author intended.
parent aea0ad91
......@@ -2051,26 +2051,6 @@ static DWORD wodPlayer_NotifyCompletions(WINE_WAVEDEV* wwo, BOOL force)
}
static 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);
if (revents & POLLERR)
return;
/*if (revents & POLLOUT)
return 0;*/
}
}
/**************************************************************************
* wodPlayer_Reset [internal]
*
......@@ -2085,7 +2065,7 @@ static void wodPlayer_Reset(WINE_WAVEDEV* wwo)
TRACE("(%p)\n", wwo);
/* flush all possible output */
wait_for_poll(wwo->pcm, wwo->ufds, wwo->count);
snd_pcm_drain(wwo->pcm);
wodUpdatePlayedTotal(wwo, NULL);
/* updates current notify list */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment