From ee7e6edf3102c90d951391532d6dfbe827822ffd Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 18 Apr 2017 18:42:02 +0100 Subject: [PATCH] Android: Add audio stretch setting --- .../dolphinemu/ui/settings/SettingsFragmentPresenter.java | 3 +++ .../java/org/dolphinemu/dolphinemu/utils/SettingsFile.java | 1 + Source/Android/app/src/main/res/values/strings.xml | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java index aa02ad3e5c..72f0be81c1 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java @@ -163,6 +163,7 @@ public final class SettingsFragmentPresenter Setting overclock = null; Setting continuousScan = null; Setting wiimoteSpeaker = null; + Setting audioStretch = null; if (!mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty()) { @@ -172,6 +173,7 @@ public final class SettingsFragmentPresenter overclock = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_OVERCLOCK_PERCENT); continuousScan = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_WIIMOTE_SCAN); wiimoteSpeaker = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_WIIMOTE_SPEAKER); + audioStretch = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_AUDIO_STRETCH); } else { @@ -207,6 +209,7 @@ public final class SettingsFragmentPresenter sl.add(new SliderSetting(SettingsFile.KEY_OVERCLOCK_PERCENT, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.overclock_title, 0, 400, "%", 100, overclock)); sl.add(new CheckBoxSetting(SettingsFile.KEY_WIIMOTE_SCAN, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.wiimote_scanning, R.string.wiimote_scanning_description, true, continuousScan)); sl.add(new CheckBoxSetting(SettingsFile.KEY_WIIMOTE_SPEAKER, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.wiimote_speaker, R.string.wiimote_speaker_description, true, wiimoteSpeaker)); + sl.add(new CheckBoxSetting(SettingsFile.KEY_AUDIO_STRETCH, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.audio_stretch, R.string.audio_stretch_description, false, audioStretch)); } private void addGcPadSettings(ArrayList sl) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java index 76043fbb3f..e8d1cb1b8d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java @@ -53,6 +53,7 @@ public final class SettingsFile public static final String KEY_OVERCLOCK_ENABLE = "OverclockEnable"; public static final String KEY_OVERCLOCK_PERCENT = "Overclock"; public static final String KEY_VIDEO_BACKEND = "GFXBackend"; + public static final String KEY_AUDIO_STRETCH = "AudioStretch"; public static final String KEY_SHOW_FPS = "ShowFPS"; public static final String KEY_INTERNAL_RES = "EFBScale"; diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 10be6058bb..13930d5190 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -121,7 +121,8 @@ Leave this on if you are using a DolphinBar for real Wiimote support. Wii Remote Speaker Enable sound output through the speaker on a real Wiimote (DolphinBar required). - + Audio Stretching + Stretches audio to reduce stuttering. Increases latency. Video Backend