I have AcousticEchoCanceler working for VoIP calls for every other device type I've tried, but not on any Samsung device. The device reports AcousticEchoCanceler being available but it simply does nothing.
What I've got:
acousticEchoCanceler.setEnabled(true);
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
- Audio session ID passed to
AudioTrack
- Sample rate: 16k
- Tried both mono and stereo recording
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
Has anyone got AcousticEchoCanceler to work on a Samsung device?
I had the same issue recently. The most important part for me was to use audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION) before creating the AudioRecord.
Next the AudioRecord was created with :
And finally create and enable the NS and AEC :
The AudioTrack doesn't need to be associated to same Audio session ID than AudioTrack (I suppose it should be done automatically).