wasapi: fixed very rare bug causing a dead looping if WASAPI input stream is being aborted

This commit is contained in:
dmitrykos 2010-06-22 19:53:00 +00:00
commit fd47a09808

View file

@ -3361,6 +3361,10 @@ static HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor
for (;;)
{
// Check if blocking call must be interrupted
if (WaitForSingleObject(stream->hCloseRequest, 1) != WAIT_TIMEOUT)
break;
// Get the available data in the shared buffer.
if ((hr = IAudioCaptureClient_GetBuffer(stream->cclient, &data, &frames, &flags, NULL, NULL)) != S_OK)
{