mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-23 06:21:57 +00:00
wasapi: Patched to compile.
This commit is contained in:
parent
a35bcad0be
commit
31404a9dcb
1 changed files with 1 additions and 1 deletions
|
|
@ -592,7 +592,7 @@ static int WASAPI_RecordDevice(SDL_AudioDevice *device, void *buffer, int buflen
|
|||
UINT32 frames = 0;
|
||||
DWORD flags = 0;
|
||||
|
||||
while (device->hidden->capture && !SDL_GetAtomicInt(&device->hidden->device_disconnecting))
|
||||
while (device->hidden->capture && !SDL_GetAtomicInt(&device->hidden->device_disconnecting)) {
|
||||
const HRESULT ret = IAudioCaptureClient_GetBuffer(device->hidden->capture, &ptr, &frames, &flags, NULL, NULL);
|
||||
if (ret == AUDCLNT_S_BUFFER_EMPTY) {
|
||||
return 0; // in theory we should have waited until there was data, but oh well, we'll go back to waiting. Returning 0 is safe in SDL3.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue