Fixed audio dropouts when plenty of audio is queued on Android
This commit is contained in:
@@ -355,8 +355,9 @@ static bool BuildAAudioStream(SDL_AudioDevice *device)
|
|||||||
|
|
||||||
SDL_UpdatedAudioDeviceFormat(device);
|
SDL_UpdatedAudioDeviceFormat(device);
|
||||||
|
|
||||||
// Allocate a double buffered mixing buffer
|
// Allocate a triple buffered mixing buffer
|
||||||
hidden->num_buffers = 2;
|
// Two buffers can be in the process of being filled while the third is being read
|
||||||
|
hidden->num_buffers = 3;
|
||||||
hidden->mixbuf_bytes = (hidden->num_buffers * device->buffer_size);
|
hidden->mixbuf_bytes = (hidden->num_buffers * device->buffer_size);
|
||||||
hidden->mixbuf = (Uint8 *)SDL_aligned_alloc(SDL_GetSIMDAlignment(), hidden->mixbuf_bytes);
|
hidden->mixbuf = (Uint8 *)SDL_aligned_alloc(SDL_GetSIMDAlignment(), hidden->mixbuf_bytes);
|
||||||
if (!hidden->mixbuf) {
|
if (!hidden->mixbuf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user