Skip to content

Commit

Permalink
wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #3633.
  • Loading branch information
icculus committed May 19, 2017
1 parent 0277381 commit 91e6054
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/audio/wasapi/SDL_wasapi.c
Expand Up @@ -563,7 +563,9 @@ WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen)
DWORD flags = 0;

ret = IAudioCaptureClient_GetBuffer(this->hidden->capture, &ptr, &frames, &flags, NULL, NULL);
WasapiFailed(this, ret); /* mark device lost/failed if necessary. */
if (ret != AUDCLNT_S_BUFFER_EMPTY) {
WasapiFailed(this, ret); /* mark device lost/failed if necessary. */
}

if ((ret == AUDCLNT_S_BUFFER_EMPTY) || !frames) {
WASAPI_WaitDevice(this);
Expand Down

0 comments on commit 91e6054

Please sign in to comment.