Android: Add some audio settings

This commit is contained in:
Connor McLaughlin 2020-10-10 18:51:25 +10:00
parent fc28ba75da
commit b612958daa
2 changed files with 42 additions and 14 deletions

View File

@ -176,4 +176,16 @@
<item>analog_stick</item>
<item>analog_sticks</item>
</string-array>
<string-array name="settings_audio_buffer_size_entries">
<item>1024 Frames (23.22ms)</item>
<item>2048 Frames (46.44ms)</item>
<item>3072 Frames (69.66ms, Recommended)</item>
<item>4096 Frames (92.88ms)</item>
</string-array>
<string-array name="settings_audio_buffer_size_values">
<item>1024</item>
<item>2048</item>
<item>3072</item>
<item>4096</item>
</string-array>
</resources>

View File

@ -43,13 +43,6 @@
app:summary="Enable this option to match DuckStation's refresh rate with your current monitor or screen. VSync is automatically disabled when it is not possible (e.g. running at non-100% speed)."
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Audio/Sync"
app:title="Audio Sync"
app:defaultValue="true"
app:summary="Throttles the emulation speed based on the audio backend pulling audio frames. This helps to remove noises or crackling if emulation is too fast. Sync will automatically be disabled if not running at 100% speed."
app:iconSpaceReserved="false" />
<ListPreference
app:key="CPU/ExecutionMode"
app:title="@string/settings_cpu_execution_mode"
@ -124,13 +117,6 @@
app:useSimpleSummaryProvider="true"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CDROM/MuteCDAudio"
app:title="Mute CD Audio"
app:defaultValue="false"
app:summary="Forcibly mutes both CD-DA and XA audio from the CD-ROM. Can be used to disable background music in some games."
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="BIOS/PatchFastBoot"
app:title="@string/settings_console_fast_boot"
@ -300,6 +286,36 @@
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory app:title="Audio Settings" app:iconSpaceReserved="false">
<SwitchPreferenceCompat
app:key="Audio/OutputMuted"
app:title="Mute All Sound"
app:defaultValue="false"
app:summary="Prevents the emulator from emitting any sound."
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CDROM/MuteCDAudio"
app:title="Mute CD Audio"
app:defaultValue="false"
app:summary="Forcibly mutes both CD-DA and XA audio from the CD-ROM. Can be used to disable background music in some games."
app:iconSpaceReserved="false" />
<ListPreference
app:key="Audio/BufferSize"
app:title="Audio Buffer Size"
app:entries="@array/settings_audio_buffer_size_entries"
app:entryValues="@array/settings_audio_buffer_size_values"
app:defaultValue="3072"
app:summary="Determines the latency between audio being generated and output to speakers. Smaller values reduce latency, but variations in emulation speed will cause hitches."
app:useSimpleSummaryProvider="true"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Audio/Sync"
app:title="Audio Sync"
app:defaultValue="true"
app:summary="Throttles the emulation speed based on the audio backend pulling audio frames. This helps to remove noises or crackling if emulation is too fast. Sync will automatically be disabled if not running at 100% speed."
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory app:title="Advanced Settings" app:iconSpaceReserved="false">
<SwitchPreferenceCompat
app:key="GPU/PGXPVertexCache"