mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 04:08:27 +00:00
wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.
Fixes Bugzilla #3633.
This commit is contained in:
parent
02773811b3
commit
91e6054b03
1 changed files with 3 additions and 1 deletions
|
@ -563,7 +563,9 @@ WASAPI_CaptureFromDevice(_THIS, void *buffer, int buflen)
|
||||||
DWORD flags = 0;
|
DWORD flags = 0;
|
||||||
|
|
||||||
ret = IAudioCaptureClient_GetBuffer(this->hidden->capture, &ptr, &frames, &flags, NULL, NULL);
|
ret = IAudioCaptureClient_GetBuffer(this->hidden->capture, &ptr, &frames, &flags, NULL, NULL);
|
||||||
|
if (ret != AUDCLNT_S_BUFFER_EMPTY) {
|
||||||
WasapiFailed(this, ret); /* mark device lost/failed if necessary. */
|
WasapiFailed(this, ret); /* mark device lost/failed if necessary. */
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret == AUDCLNT_S_BUFFER_EMPTY) || !frames) {
|
if ((ret == AUDCLNT_S_BUFFER_EMPTY) || !frames) {
|
||||||
WASAPI_WaitDevice(this);
|
WASAPI_WaitDevice(this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue