Reputation:
I am making a video conferencing app where audio is very important. I just overcame a major hurdle (took me about 2 weeks out of a 2 and a half weeks of working on it), switching audio devices, but now when I go to test it on 2 computers and turn up my microphone the audio goes quiet. I then turned up the mic input, which worked for about the same amount of time before the volume dropped. I even tried setting autoGainControl
to false
, but that didn't seem to do anything. Is there an easy way to do this?
I have tried: noiseSuppression: false
, (obviously autoGainControl
), echoCancellation: false
, channelCount: 2
, latency: 0
, all of which did not work. Here is the current code for getUserMedia
:
audio: {
echoCancellation: echoCancellationMASTER,
noiseSuppression: noiseSuppressionMASTER,
latency: 0,
sampleRate: 48000,
sampleSize: 24,
autoGainControl: false
/*autoGainControl: false,
channelCount: 2,
latency: 0,
volume: 3.0*/
}
Note that the commented out code is what I have also tried, but am not currently using.
Click here for the github code
Any ideas are appreciated, thanks!!
Upvotes: 1
Views: 983
Reputation: 163612
Firstly, go to chrome://webrtc-internals
to ensure your constraints are getting applied correctly, in the way that you expect them to be.
Next, use a set of headphones on each to eliminate the possibility of feedback. This will help confirm the problem, which I suspect is some echo cancellation algorithm somewhere. Once you've confirmed that's the case...
Even though you set echoCancellation
to false
, and noiseSuppression
to false
, many devices still have their own "enhancements" for feedback reduction. I suspect this is what you're hearing.
If this is the case, then there really isn't anything you can do about it as a web developer. It's at a whole different layer apart from the browser. I often see this problem with Lenovo's Realtek drivers when using the microphone as a "communications" device, but have had the same issue on other computers.
Upvotes: 1