Setting WebRTC audio media constraints in libjingle_peerconnection to disable audio processing
<p>Is it possible to disable all audio processing with the API provided by libjingle?</p>

<p>I'm trying to set media constraints for an audio stream using the libjingle_peerconnection CocoaPod on OS X. These are constraints that would normally be passed to <code>getUserMedia()</code> in JavaScript. My goal is to set several parameters to <code>false</code> to essentially disable all audio processing.</p>

<pre><code>    let audioPairs = [
        RTCPair(key: "echoCancellation", value: "false"),
        RTCPair(key: "googEchoCancellation", value: "false"),
        RTCPair(key: "googEchoCancellation2", value: "false"),
        RTCPair(key: "googAutoGainControl", value: "false"),
        RTCPair(key: "googAutoGainControl2", value: "false"),
        RTCPair(key: "googNoiseSuppression", value: "false"),
        RTCPair(key: "googHighpassFilter", value: "false"),
        RTCPair(key: "googTypingNoiseDetection", value: "false"),
        RTCPair(key: "googAudioMirroring", value: "false")
    ]

    let audioConstraints = RTCMediaConstraints(mandatoryConstraints: [RTCPair](), optionalConstraints: audioPairs)
</code></pre>

<p>I tried:</p>

<ol>
<li>Passing the constraints into <code>RTCPeerConnectionFactory.peerConnectionWithICEServers(_, constraints, delegate)</code></li>
<li>Passing the constraints into <code>RTCPeerConnection.createAnswerWithDelegate(_, constraints)</code></li>
</ol>

<p>However, none of the constraints are being honored. Audio processing still occurs. Making the constraints mandatory causes failures during the answer/offer handshake (since they are not allowed as mandatory parameters). </p>

<p>I feel like I should be passing these constraints into something like <code>RTCPeerConnectionFactory.mediaStreamWithLabel(_)</code> or <code>RTCPeerConnectionFactory.audioTrackWithID(_)</code>, but there is no API for passing in constraints at this point. There was once a method called <code>RTCPeerConnection.addStream(_, constraints)</code>, but the constraints arguments has been removed.</p>