Improve Performance of Granular Buffering + User Adjustable Buffer Size

This commit is contained in:
Sam Belliveau
2025-04-01 18:17:21 -04:00
parent 1b85da9b85
commit 877864c23a
8 changed files with 218 additions and 172 deletions

View File

@ -32,6 +32,7 @@ enum class IntSetting(
MAIN_SI_DEVICE_2(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice2", 0),
MAIN_SI_DEVICE_3(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice3", 0),
MAIN_AUDIO_VOLUME(Settings.FILE_DOLPHIN, Settings.SECTION_INI_DSP, "Volume", 100),
MAIN_AUDIO_BUFFER_SIZE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_DSP, "AudioBufferSize", 80),
MAIN_OVERLAY_GC_CONTROLLER(
Settings.FILE_DOLPHIN,
Settings.SECTION_INI_ANDROID,

View File

@ -531,6 +531,18 @@ class SettingsFragmentPresenter(
dspEngineValues
)
)
sl.add(
IntSliderSetting(
context,
IntSetting.MAIN_AUDIO_BUFFER_SIZE,
R.string.audio_buffer_size,
R.string.audio_buffer_size_description,
16,
512,
"ms",
8
)
)
sl.add(
SwitchSetting(
context,

View File

@ -183,6 +183,8 @@
<!-- Audio Settings -->
<string name="audio_submenu">Audio</string>
<string name="dsp_emulation_engine">DSP Emulation Engine</string>
<string name="audio_buffer_size">Audio Buffer Size</string>
<string name="audio_buffer_size_description">Controls the number of audio samples buffered. Lower values reduce latency but may cause more crackling or stuttering. If unsure, set this to 80 ms.</string>
<string name="audio_fill_gaps">Fill Audio Gaps</string>
<string name="audio_fill_gaps_description">Repeat existing audio during lag spikes to prevent stuttering. If unsure, leave this checked.</string>
<string name="audio_volume">Audio Volume</string>