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

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

Issue 2002093002: Add an option to disable built-in AEC to AppRTC Android Demo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove empty line Created 4 years, 7 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/WebRtcAudioEffects.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 fd27ca770bd523a7ae27ecf6b339caddfcbbdacd..579482e14b88d27ef285a37b73cf378e9fd53851 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
@@ -100,6 +100,22 @@ public final class WebRtcAudioUtils {
return useWebRtcBasedNoiseSuppressor;
}
+ // Returns true if the device supports an audio effect (AEC, AGC or NS).
+ // Four conditions must be fulfilled if functions are to return true:
+ // 1) the platform must support the built-in (HW) effect,
+ // 2) explicit use (override) of a WebRTC based version must not be set,
+ // 3) the device must not be blacklisted for use of the effect, and
+ // 4) the UUID of the effect must be approved (some UUIDs can be excluded).
+ public static boolean isAcousticEchoCancelerSupported() {
+ return WebRtcAudioEffects.canUseAcousticEchoCanceler();
+ }
+ public static boolean isAutomaticGainControlSupported() {
+ return WebRtcAudioEffects.canUseAutomaticGainControl();
+ }
+ public static boolean isNoiseSuppressorSupported() {
+ return WebRtcAudioEffects.canUseNoiseSuppressor();
+ }
+
// Call this method if the default handling of querying the native sample
// rate shall be overridden. Can be useful on some devices where the
// available Android APIs are known to return invalid results.
« no previous file with comments | « webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698