Post #3434658
2025-09-05 03:10 UTC
Replies (1)
-
@alice@mk.nyaa.place 2025-09-07 00:42
More progress on performance: when running an N64 game in LLE mode and if it doesn't run at full speed, the app will show a toast suggesting to switch to HLE. This only happens once (there's a debug flag to show it every time, that's how I took that screenshot), and it's just there for discoverability reasons, since we default to LLE/accuracy. Detecting slowdowns wasn't particularly straightforward tho. For most platforms this just involves tracking average framerate... except for N64. Mupen is entirely async, and run_frame() callbacks are fast. If it slows down, it does this internally and we'll never even know about this. But one thing we do know is that we get audio buffer underruns. Normally, the amount of samples we play should be more or less equal to the core sample rate × channels. However, if the game is slow, we'll play less samples and it will be audible as crackling and stutter. So, the check is very simple: the game is slowing down if we played 95% or less than the sample rate.