| Index: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
|
| diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
|
| index f12d5ce48f7c816f2718cd5abbf0b5b919ceb39b..c18153f03588f627e8d137b80d94059de9ee45e0 100644
|
| --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
|
| +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
|
| @@ -160,6 +160,8 @@ public class PeerConnectionClient {
|
| public final boolean aecDump;
|
| public final boolean useOpenSLES;
|
| public final boolean disableBuiltInAEC;
|
| + public final boolean disableBuiltInAGC;
|
| + public final boolean disableBuiltInNS;
|
|
|
| public PeerConnectionParameters(
|
| boolean videoCallEnabled, boolean loopback, boolean tracing, boolean useCamera2,
|
| @@ -167,7 +169,7 @@ public class PeerConnectionClient {
|
| int videoStartBitrate, String videoCodec, boolean videoCodecHwAcceleration,
|
| boolean captureToTexture, int audioStartBitrate, String audioCodec,
|
| boolean noAudioProcessing, boolean aecDump, boolean useOpenSLES,
|
| - boolean disableBuiltInAEC) {
|
| + boolean disableBuiltInAEC, boolean disableBuiltInAGC, boolean disableBuiltInNS) {
|
| this.videoCallEnabled = videoCallEnabled;
|
| this.useCamera2 = useCamera2;
|
| this.loopback = loopback;
|
| @@ -185,6 +187,8 @@ public class PeerConnectionClient {
|
| this.aecDump = aecDump;
|
| this.useOpenSLES = useOpenSLES;
|
| this.disableBuiltInAEC = disableBuiltInAEC;
|
| + this.disableBuiltInAGC = disableBuiltInAGC;
|
| + this.disableBuiltInNS = disableBuiltInNS;
|
| }
|
| }
|
|
|
| @@ -368,6 +372,22 @@ public class PeerConnectionClient {
|
| WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(false);
|
| }
|
|
|
| + if (peerConnectionParameters.disableBuiltInAGC) {
|
| + Log.d(TAG, "Disable built-in AGC even if device supports it");
|
| + WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl(true);
|
| + } else {
|
| + Log.d(TAG, "Enable built-in AGC if device supports it");
|
| + WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl(false);
|
| + }
|
| +
|
| + if (peerConnectionParameters.disableBuiltInNS) {
|
| + Log.d(TAG, "Disable built-in NS even if device supports it");
|
| + WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(true);
|
| + } else {
|
| + Log.d(TAG, "Enable built-in NS if device supports it");
|
| + WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(false);
|
| + }
|
| +
|
| // Create peer connection factory.
|
| if (!PeerConnectionFactory.initializeAndroidGlobals(context, true, true,
|
| peerConnectionParameters.videoCodecHwAcceleration)) {
|
|
|