Mgba core and audio buffer size

Hi,

I have all my cores working with a small latency of 34ms only, with a max_swapchain=2, on a Pi3b+. That includes GenesisPlus GX, Nestopia, FBA…

However, mgba starts crackling as soon as I get down from ~60ms, no matter what.

So, does this core have an internal buffer or something similar that could prevent small audio buffers from working? CPU usage is low, ~30%. The other cores have around the same CPU usage and they have no problems with this small audio delay value…

I think there are some issues with audio crackles that are upstream-related. Not sure on the details, though. I just remember there being some issues/discussions on github about it.

The sound issues I noticed were fixed awhile ago: https://github.com/libretro/mgba/issues/103

1 Like

It’s related to buffer size only: over 64ms I get no crackling at all, and CPU usage is very low. Even on X86_64, using the same drivers (KMSDRM+ALSA), it has the same problem. This core has something with internal buffer size. Any idea on where does it define such a thing, if it does at all?

Hi…once I set the buffer size in my ASIO control panel to 512 it works properly. After that, the buffer size set within mGBA does not matter and still runs flawlessly. If my ASIO control panel buffer size is anything but 512, I encounter random frame drops regardless of any mGBA settings. I tried playing around with every audio/video option within mGBA and nothing fixes it, the ASIO control panel buffer size set to 512 seems to be the only solution.