haiyangwu / mediasoup-demo-android

mediasoup android demo https://demo.mediasoup.org
96 stars 65 forks source link

Echo cancellation doesn't work #22

Closed skgwazap closed 4 years ago

skgwazap commented 4 years ago

Can't make echo cancellation work. In a room with 2+ participants I hear myself after a short delay. I've tried to specify some flags explicitly:

JavaAudioDeviceModule.builder(appContext)
                .setUseHardwareAcousticEchoCanceler(true)
                .setUseHardwareNoiseSuppressor(true)

but with no success. Official AppRtc demo from Google works fine. Any ideas how to fix this?

skgwazap commented 4 years ago

Well, I found a reason - a correct mode must be set in AudioManager audioManager.mode = AudioManager.MODE_IN_COMMUNICATION before any call.