SIP.js icon indicating copy to clipboard operation
SIP.js copied to clipboard

Automatic Gain Control (AGC)

Open calxibe opened this issue 4 years ago • 1 comments

I cant find anything in docs about how to disable AGC.

Earlier it was possible to use "{ optional: [{ googAutoGainControl: false }] }", but i cant get it to work on v0.17.1 (upgraded from 0.15.7)

calxibe avatar Aug 20 '20 12:08 calxibe

We've run into the same thing. Related to this issue here, if you want a quick workaround:

https://github.com/onsip/SIP.js/pull/592

Would definitely be good to have a better solution than this in the core SDH, though I understand the considerations on that.

joshelson avatar Oct 19 '20 22:10 joshelson

Disabling AGC (and a bunch of other stuff) was moved to getUserMedia() a while ago and is that how you are trying to set it? (Not using a second parameter to RTCPeerConnection per #592)...

https://groups.google.com/g/discuss-webrtc/c/m6Rory-FjAg https://groups.google.com/g/discuss-webrtc/c/-ACwaFI7jWQ

So you should be able to pass them as constraints on SessionDescriptionHandlerOptions. For example...

new Inviter(ua, target, {
  sessionDescriptionHandlerOptions: {
    constraints: // here
  }

I haven't tested this exact bit of code, but I believe this is something like what you want for constraints...

constraints: {
        audio: {
            mandatory: {
                googEchoCancellation: false,
                googAutoGainControl: false,
                googAutoGainControl2: false,
                googNoiseSuppression: false,
                googHighpassFilter: false,
                googTypingNoiseDetection: false
            }
        },
        video: false
    }

Regardless, I believe you are able to do what you are looking to do without changes to the library code.

john-e-riordan avatar Oct 02 '22 18:10 john-e-riordan

but for some reason it didn't work for me

axundov2011 avatar Jul 11 '23 07:07 axundov2011