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

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

Issue 1952123003: Surface the IntelligibilityEnhancer on MediaConstraints (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
index 1213f333d930778a8cba06d330b88afb9cf35b1a..67f079903d9a60ab72f2ba7f0aabff7c714038f6 100644
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
@@ -80,6 +80,7 @@ public class WebRtcAudioManager {
private boolean hardwareAEC;
private boolean hardwareAGC;
private boolean hardwareNS;
+ private boolean intelligibility;
private boolean lowLatencyOutput;
private int sampleRate;
private int channels;
@@ -98,7 +99,7 @@ public class WebRtcAudioManager {
storeAudioParameters();
nativeCacheAudioParameters(
sampleRate, channels, hardwareAEC, hardwareAGC, hardwareNS,
- lowLatencyOutput, outputBufferSize, inputBufferSize,
+ intelligibility, lowLatencyOutput, outputBufferSize, inputBufferSize,
nativeAudioManager);
}
@@ -141,6 +142,7 @@ public class WebRtcAudioManager {
hardwareAEC = isAcousticEchoCancelerSupported();
hardwareAGC = isAutomaticGainControlSupported();
hardwareNS = isNoiseSuppressorSupported();
+ intelligibility = isIntelligibilityEnhancerEnabled();
lowLatencyOutput = isLowLatencyOutputSupported();
outputBufferSize = lowLatencyOutput ?
getLowLatencyOutputFramesPerBuffer() :
@@ -237,6 +239,11 @@ public class WebRtcAudioManager {
return WebRtcAudioEffects.canUseNoiseSuppressor();
}
+ // Returns true if the Intelligibility Enhancer is enabled.
+ private static boolean isIntelligibilityEnhancerEnabled() {
+ return WebRtcAudioUtils.useWebRtcBasedIntelligibilityEnhancer();
+ }
+
// Returns the minimum output buffer size for Java based audio (AudioTrack).
// This size can also be used for OpenSL ES implementations on devices that
// lacks support of low-latency output.
@@ -287,6 +294,6 @@ public class WebRtcAudioManager {
private native void nativeCacheAudioParameters(
int sampleRate, int channels, boolean hardwareAEC, boolean hardwareAGC,
- boolean hardwareNS, boolean lowLatencyOutput, int outputBufferSize,
- int inputBufferSize, long nativeAudioManager);
+ boolean hardwareNS, boolean intelligibility, boolean lowLatencyOutput,
+ int outputBufferSize, int inputBufferSize, long nativeAudioManager);
}

Powered by Google App Engine
This is Rietveld 408576698