wasapi: fixed very rare bug causing a dead looping if WASAPI input stream is being aborted
This commit is contained in:
parent
5444956b5c
commit
fd47a09808
1 changed files with 4 additions and 0 deletions
|
|
@ -3361,6 +3361,10 @@ static HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
// Check if blocking call must be interrupted
|
||||||
|
if (WaitForSingleObject(stream->hCloseRequest, 1) != WAIT_TIMEOUT)
|
||||||
|
break;
|
||||||
|
|
||||||
// Get the available data in the shared buffer.
|
// Get the available data in the shared buffer.
|
||||||
if ((hr = IAudioCaptureClient_GetBuffer(stream->cclient, &data, &frames, &flags, NULL, NULL)) != S_OK)
|
if ((hr = IAudioCaptureClient_GetBuffer(stream->cclient, &data, &frames, &flags, NULL, NULL)) != S_OK)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue