So I'm trying to develop an android VoIP application. I'm having trouble making the echo cancellation work and can still hear myself talk when on loudspeaker mode.
AudioRecord recorder = new AudioRecord(
MediaRecorder.AudioSource.VOICE_COMMUNICATION, mSampleRate,
AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT, bufferSize);
echoCanceler = AcousticEchoCanceler.create(recorder.getAudioSessionId());
echoCanceler.setEnabled(true);
Ive tried changing settings to CHANNEL_IN_STEREO
. Changing playback settings to MODE_IN_COMMUNICATON
but still no luck.
Im using a samsung S7 and Nexus 5 to test.