Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java

Issue 1162583005: Exclude Nexus 6 from OpenSL ES usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java
index 68096687c919d36d5db476f8dc3fcf945b3981d8..9aff519a17d0890047737684949882364735c554 100644
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java
@@ -35,6 +35,13 @@ public final class WebRtcAudioUtils {
"D6503", // Sony Xperia Z2 D6503
};
+ // List of devices where we have seen issues (e.g. bad audio quality) using
+ // the low latency ouput mode in combination with OpenSL ES.
+ // The device name is given by Build.MODEL.
+ private static final String[] BLACKLISTED_OPEN_SL_ES_MODELS = new String[] {
+ "Nexus 6", // Nexus 6
+ };
+
// Use 44.1kHz as the default sampling rate.
private static final int SAMPLE_RATE_HZ = 44100;
@@ -76,6 +83,13 @@ public final class WebRtcAudioUtils {
return blackListedModels.contains(Build.MODEL);
}
+ // Returns true if the device is blacklisted for OpenSL ES usage.
+ public static boolean deviceIsBlacklistedForOpenSLESUsage() {
+ List<String> blackListedModels =
+ Arrays.asList(BLACKLISTED_OPEN_SL_ES_MODELS);
+ return blackListedModels.contains(Build.MODEL);
+ }
+
// Returns true if the device supports Acoustic Echo Canceler (AEC).
public static boolean isAcousticEchoCancelerSupported() {
// AcousticEchoCanceler was added in API level 16 (Jelly Bean).
« no previous file with comments | « webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698