Audio stuttering when using the "High" audio latency setting
- Device model: Google Pixel 8
- Android version: Android 16 (GrapheneOS, build 2025102601)
Problem:
When using the "High (Faster)" audio latency on the latest (25/10/2025) nightly build, the emulator's audio output will stutter during game emulation. I also hear very slight audio stuttering when using the default "Medium" setting. Setting the latency to "Low (Slower)" removes the stuttering entirely (contrary to what the option name might suggest).
Steps to reproduce:
- From the ROM selection screen, open Settings, then Audio.
- Tap "Audio latency", then "High (Faster)" from the list that appears.
- Go back to the ROM selection screen, and launch a game.
- Wait for audio to start playing. The output will be garbled/stuttering.
Additional context:
I suspect this issue may be caused by my own upstream pull request, which, among other things, reduced the size of the audio buffer from 2048 to 1024 frames. Since Oboe likely increases its own internal buffer size for more power savings (and adjusts when it calls its callbacks accordingly - see the API reference), the lower size of melonDS's audio buffer may be underflowing when Oboe asks for more audio data.
I may try to fix this bug in my own pull request - if I do, I'll reference this issue there.