[Android] Time stretching by default for Android 4.4+
Geoffrey Métais
git at videolan.org
Wed Apr 22 17:33:00 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 22 17:23:44 2015 +0200| [6bdb8b25e3212c5b2a8b71fa6cb2aa0742657ff5] | committer: Geoffrey Métais
Time stretching by default for Android 4.4+
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6bdb8b25e3212c5b2a8b71fa6cb2aa0742657ff5
---
vlc-android/res/values-v19/booleans.xml | 4 ++++
vlc-android/res/values/booleans.xml | 1 +
vlc-android/res/xml/preferences.xml | 2 +-
vlc-android/src/org/videolan/vlc/util/VLCInstance.java | 5 ++++-
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/vlc-android/res/values-v19/booleans.xml b/vlc-android/res/values-v19/booleans.xml
new file mode 100644
index 0000000..00a77a3
--- /dev/null
+++ b/vlc-android/res/values-v19/booleans.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <bool name="time_stretching_default">true</bool>
+</resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/booleans.xml b/vlc-android/res/values/booleans.xml
index 9d519cd..fdb2f0e 100644
--- a/vlc-android/res/values/booleans.xml
+++ b/vlc-android/res/values/booleans.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="list_mode">true</bool>
+ <bool name="time_stretching_default">false</bool>
</resources>
\ No newline at end of file
diff --git a/vlc-android/res/xml/preferences.xml b/vlc-android/res/xml/preferences.xml
index 59ead1b..67b363c 100644
--- a/vlc-android/res/xml/preferences.xml
+++ b/vlc-android/res/xml/preferences.xml
@@ -120,7 +120,7 @@
android:widgetLayout="@layout/custom_chexbox"
android:title="@string/enable_frame_skip" />
<CheckBoxPreference
- android:defaultValue="false"
+ android:defaultValue="@bool/time_stretching_default"
android:key="enable_time_stretching_audio"
android:summary="@string/enable_time_stretching_audio_summary"
android:widgetLayout="@layout/custom_chexbox"
diff --git a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
index cea57d9..0181ad0 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
@@ -23,6 +23,7 @@ package org.videolan.vlc.util;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.LibVlcException;
import org.videolan.libvlc.LibVlcUtil;
+import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.VLCCrashHandler;
import org.videolan.vlc.gui.CompatErrorActivity;
@@ -88,8 +89,10 @@ public class VLCInstance {
if (sLibVLC == null)
return;
+ boolean time_streching_default = VLCApplication.getAppResources().getBoolean(R.bool.time_stretching_default);
+
sLibVLC.setSubtitlesEncoding(pref.getString("subtitle_text_encoding", ""));
- sLibVLC.setTimeStretching(pref.getBoolean("enable_time_stretching_audio", false));
+ sLibVLC.setTimeStretching(pref.getBoolean("enable_time_stretching_audio", time_streching_default));
sLibVLC.setFrameSkip(pref.getBoolean("enable_frame_skip", false));
sLibVLC.setChroma(pref.getString("chroma_format", ""));
sLibVLC.setVerboseMode(pref.getBoolean("enable_verbose_mode", true));
More information about the Android
mailing list