[Commits] SDL: wasapi: don't mark capture devices as failed for AUDCLNT_S_...

libsdl.org revision control commits-owner at libsdl.org
Fri May 19 09:41:05 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/4210074a33c8
changeset: 11014:4210074a33c8
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Fri May 19 12:40:55 2017 -0400
description:
wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.

Fixes Bugzilla #3633.

diffstat:

 src/audio/wasapi/SDL_wasapi.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 06a6583f0fda -r 4210074a33c8 src/audio/wasapi/SDL_wasapi.c
--- a/src/audio/wasapi/SDL_wasapi.c	Thu May 18 21:00:11 2017 -0400
+++ b/src/audio/wasapi/SDL_wasapi.c	Fri May 19 12:40:55 2017 -0400
@@ -563,7 +563,9 @@
         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);


More information about the commits mailing list