mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-26 01:46:20 +08:00
aaudio: We need a mixbuf on capture devices, too.
This commit is contained in:
@@ -260,13 +260,11 @@ static int AAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||
SDL_UpdatedAudioDeviceFormat(device);
|
||||
|
||||
// Allocate mixing buffer
|
||||
if (!iscapture) {
|
||||
hidden->mixbuf = (Uint8 *)SDL_malloc(device->buffer_size);
|
||||
if (hidden->mixbuf == NULL) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
SDL_memset(hidden->mixbuf, device->silence_value, device->buffer_size);
|
||||
hidden->mixbuf = (Uint8 *)SDL_malloc(device->buffer_size);
|
||||
if (hidden->mixbuf == NULL) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
SDL_memset(hidden->mixbuf, device->silence_value, device->buffer_size);
|
||||
|
||||
hidden->semaphore = SDL_CreateSemaphore(0);
|
||||
if (!hidden->semaphore) {
|
||||
|
||||
Reference in New Issue
Block a user