mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 17:10:12 +00:00
(Android Phoenix) Add ability to set automatic audio latency option on/off
This commit is contained in:
parent
9a2a7854ea
commit
e6f527e992
@ -120,6 +120,12 @@
|
||||
android:summary="Use (very) high latency audio. Necessary for older Android devices with poor audio drivers."
|
||||
android:title="High latency audio"
|
||||
android:dependency="audio_enable" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="audio_latency_auto"
|
||||
android:summary="Use automatic audio latency detection. Only available for Android 4.1 and up - your mileage may vary based on the device you are using."
|
||||
android:title="Automatic audio latency"
|
||||
android:dependency="audio_enable" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen android:title="Input Options" >
|
||||
|
@ -359,7 +359,8 @@ public class MainMenuActivity extends PreferenceActivity {
|
||||
config.setInt("audio_out_rate", optimalRate);
|
||||
|
||||
// Refactor this entire mess and make this usable for per-core config
|
||||
if (android.os.Build.VERSION.SDK_INT >= 17) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= 17 &&
|
||||
prefs.getBoolean("audio_latency_auto", true) == true) {
|
||||
int buffersize = getLowLatencyBufferSize();
|
||||
|
||||
boolean lowLatency = hasLowLatencyAudio();
|
||||
|
Loading…
Reference in New Issue
Block a user