[Android] VLCOptions: enable SoXR resampler on decent devices
Thomas Guillem
git at videolan.org
Fri Nov 6 13:37:48 CET 2015
vlc-ports/android | branch: playlist | Thomas Guillem <thomas at gllm.fr> | Tue Nov 3 15:57:15 2015 +0100| [aec600093fac6382caf481375fbe9fffd2c7bb78] | committer: Geoffrey Métais
VLCOptions: enable SoXR resampler on decent devices
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=aec600093fac6382caf481375fbe9fffd2c7bb78
---
vlc-android/src/org/videolan/vlc/util/VLCOptions.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
index 70afae7..9e7e596 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
@@ -91,6 +91,8 @@ public class VLCOptions {
options.add("--network-caching=" + networkCaching);
options.add("--androidwindow-chroma");
options.add(chroma != null ? chroma : "RV32");
+ options.add("--audio-resampler");
+ options.add(getResampler());
options.add(verboseMode ? "-vvv" : "-vv");
return options;
@@ -136,6 +138,11 @@ public class VLCOptions {
return ret;
}
+ private static String getResampler() {
+ final VLCUtil.MachineSpecs m = VLCUtil.getMachineSpecs();
+ return m.processors > 2 ? "soxr" : "ugly";
+ }
+
public static void setMediaOptions(Media media, Context context, int flags) {
boolean noHardwareAcceleration = (flags & MediaWrapper.MEDIA_NO_HWACCEL) != 0;
boolean noVideo = (flags & MediaWrapper.MEDIA_VIDEO) == 0;
More information about the Android
mailing list