mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
(OpenSL) buf_count - make sure it can never be lower than 2 (with
current code) - was an issue when setting audio latency to much lower values
This commit is contained in:
parent
54708a944a
commit
defcde0d1e
@ -133,6 +133,9 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
sl->buf_count = (latency * 4 * rate + 500) / 1000;
|
||||
sl->buf_count = (sl->buf_count + sl->buf_size / 2) / sl->buf_size;
|
||||
|
||||
if (sl->buf_count < 2)
|
||||
sl->buf_count = 2;
|
||||
|
||||
sl->buffer = (uint8_t**)calloc(sizeof(uint8_t*), sl->buf_count);
|
||||
if (!sl->buffer)
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user