This PR uses the new RETRO_ENVIRONMENT_SET_AUDIO_BUFFER_STATUS_CALLBACK environment callback (added here: https://github.com/libretro/RetroArch/pull/11451) to implement optional automatic frame skipping.
A Frameskip core option has been added, with the following settings:
OFF
Auto: Skips frames when the frontend reports that an audio buffer underrun is likely (nominally at 25% buffer occupancy)
Aggressive: Skips frames when the audio buffer occupancy drops below 33%
Max: Skips frames when the audio buffer occupancy drops below 50%
Note that this requires an audio buffer of sufficient size - setting frontend Audio Latency to 128 ms seems to be the sweet spot.
Tested on an RG350M (with Audio Latency at 128 ms), adjusting the Frameskip option allows even the most demanding games to run without crackling audio (and frames are only skipped when necessary)
In addition, this PR cleans up the core options header file (which is at present in a dreadful mess - it seems that several copy/paste errors were made in the past...)
@jdgleaver Hello and thanks for the contributions. Your changes lock up the 3DS port (using latest development builds) whenever frameskip is set to Auto.
This PR uses the new
RETRO_ENVIRONMENT_SET_AUDIO_BUFFER_STATUS_CALLBACK
environment callback (added here: https://github.com/libretro/RetroArch/pull/11451) to implement optional automatic frame skipping.A
Frameskip
core option has been added, with the following settings:OFF
Auto
: Skips frames when the frontend reports that an audio buffer underrun is likely (nominally at 25% buffer occupancy)Aggressive
: Skips frames when the audio buffer occupancy drops below 33%Max
: Skips frames when the audio buffer occupancy drops below 50%Note that this requires an audio buffer of sufficient size - setting frontend
Audio Latency
to 128 ms seems to be the sweet spot.Tested on an RG350M (with
Audio Latency
at 128 ms), adjusting theFrameskip
option allows even the most demanding games to run without crackling audio (and frames are only skipped when necessary)In addition, this PR cleans up the core options header file (which is at present in a dreadful mess - it seems that several copy/paste errors were made in the past...)