devopvoid / webrtc-java

WebRTC for desktop platforms running Java
Apache License 2.0
248 stars 60 forks source link

Increase microphone volume #53

Closed meeeee12 closed 2 years ago

meeeee12 commented 2 years ago

I am creating a video chat session with an android device, but I find the sound on the android is very low. The volume output on the android device is at max but is still too low. I have tried fixing this on the Java side by setting the mic volume to max as well as disabling echo cancellation and noise suppression but that doesnt seem to help:

AudioDeviceModule audioDevModule = new AudioDeviceModule();
audioDevModule.setMicrophoneVolume(audioDevModule.getMaxMicrophoneVolume());
factory = new PeerConnectionFactory(audioDevModule);
AudioOptions audioOptions = new AudioOptions();
audioOptions.echoCancellation = false;
audioOptions.noiseSuppression = false;
AudioTrackSource audioSource = factory.createAudioSource(audioOptions);

Is there anything else I can do such as increasing the microphone gain?

meeeee12 commented 2 years ago

I just realised that all the audioOptions are off by default, I can turn on AGC.