Hello, Need some help using the speex_echo_cancel. I've read the documentation about the speex_echo_cancellation function: speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame); (in) echo_state => speex internal state. (in) input_frame => audio captured by mic. (in) echo_frame => the signal that was played in the speaker. (out) output_frame => the signal with echo removed. I'm under linux and using portaudio as sound API. My questions are: 1) How can I grab the signal that was just played (echo_frame parameter) ? 2) PortAudio can be used to achive this ? If so, how ? If not what is the best API for grabing the output samples ? 3) Is there any sample code available on using this function ? Thank you very much, Daniel
> My questions are: > > 1) How can I grab the signal that was just played > (echo_frame parameter) ?In most cases, *you* are the one who played the signal, so you already have a copy of it. Otherwise, it's OS-dependent.> 2) PortAudio can be used to achive this ? If so, how ? If > not what is the best API for grabing the output samples ?No idea here. Jean-Marc
Thank you for your reply. The problem here is that my application plays audio it produces itself and plays audio it receives from network too. So there are two sources playing independently inside the same app. What I need is the mixed result that is going to be played by the loudspeakers. Any idea how it could be done in linux (ubuntu 8.04), using alsa ? Or even if it is possible ? I really appreciate your help! Thanks, Daniel Jean-Marc Valin escreveu:>> My questions are: >> >> 1) How can I grab the signal that was just played >> (echo_frame parameter) ? >> > > In most cases, *you* are the one who played the signal, so you already > have a copy of it. Otherwise, it's OS-dependent. > > >> 2) PortAudio can be used to achive this ? If so, how ? If >> not what is the best API for grabing the output samples ? >> > > No idea here. > > Jean-Marc > > >