On Wed, 7 Jan 2009, danflu@xxxxxxxxxxxxx wrote: > Hello, > > I'm writing a streamming audio application that criticaly > depends on a "echo cancellation" mechanism in order to work > well. > > The "echo canceler" algorithm receive as input both the > samples from microphone and the "echo samples" that come > from speaker (idealy both at the same timestamp) and make > all the calculations needed to cancel the echo at the mic > input. I have no idea what you mean by "echo samples" from the speaker. You have the output to the speaker, but that is not necessarily what the speaker actually produces ( there are phase shifts due to the mass of the cone, the support of the cone, the cross over networks, the impedance of the cone, etc. ) If you really want the "output" of the speaker, you need to put a pressure mic right at the speaker and even then you have problems at higher frequencies. > > The thing I really need to figure out is how to can get the > audio from the output using alsa(speaker) since the API I've > been using so far (openal) aparently doesn't have this > funcionality. About all you can do is to get the input to the speaker, but that is buffered by varying amounts of time, and thus the output from the speaker is shifted from any input you can sample. You could feed the output to a line-in input on a sound card. Unfortunately most cards have only one input stream. ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user