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); |
} |