mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 17:29:21 -10:00
coreaudio: prevent null buffer by forcing min latency
This commit is contained in:
1 file changed
+4
@@ -285,6 +285,10 @@ static void *coreaudio_init(const char *device,
|
||||
if (AudioUnitInitialize(dev->dev) != noErr)
|
||||
goto error;
|
||||
|
||||
/* Enforce minimum latency to prevent buffer issues */
|
||||
if (latency < 8)
|
||||
latency = 8;
|
||||
|
||||
fifo_size = (latency * (*new_rate)) / 1000;
|
||||
fifo_size *= 2 * sizeof(float);
|
||||
dev->buffer_size = fifo_size;
|
||||
|
||||
Reference in new issue
Block a user