Folks,

Here is a typical code snippet for loopback audio. In this code, I have 
added acoustic echo canceler. I have also condensed the code for brevity.

AudioRecord recorder = new AudioRecord(...);AcousticEchoCanceler aec = 
AcousticEchoCanceler.create(recorder.getAudioSessionId());
aec.setEnabled(true);
AudioTrack player = new AudioTrack(...);
...while(isRecording) {
     recorder.read(data...);
     player.write(data...);}


However, this code does not get rid of the echo. I am wondering if there is 
something that I am missing.

What I don't understand is how aec can correlate the recorder and the 
player. The aec object here has the audio session id of the recorder but it 
does not have the audio session id of the player. Shouldn't there be some 
way to inform aec about  player's audio session id? Or, perhaps the player 
can be forced to share the same audio session id.

I would appreciate any help you can provide.

Thank you in advance for your help.

Regards,
Peter

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to