From: Peter G. <jpg...@gm...> - 2008-04-24 19:21:10
|
Hi Matt On Thu, Apr 24, 2008 at 12:24 PM, Matthew Crane <mc...@no...> wrote: > On Thu, 2008-04-24 at 10:35 -0400, Peter Grayson wrote: > > > > This is my first time compiling code checked out from the svn > > > repository. When trying to run the autogen.sh script in your echocan > > > branch, autoconf is generating an error when it comes across > > > "PKG_REQUIRES": > > > > > > configure.ac:213: error: possibly undefined macro: PKG_REQUIRES > > > If this token and others are legitimate, please use > > > m4_pattern_allow. > > > See the Autoconf documentation. [snip] > I found the problem. The version of pkgconfig in SuSE Linux Enterprise > Desktop 10 SP1 has the following entry in /usr/share/aclocal/pkg.m4: > > m4_pattern_forbid([^_?PKG_[A-Z_]+$]) > > Basically, trying to define any variables of the form > "PKG_BLAH_BLAH_BLAH" in a configure.ac macro file is a no-no. I've > changed all instances of PKG_REQUIRES in my source tree to > PACKAGE_REQUIRES. If you want to include this change in the trunk so > this issue doesn't hit any other Linux users that happen to have this > pkgconfig setup, here's the diff: Good find. I've committed a fix to trunk. Also, I have committed the new echo cancellation code to iaxclient trunk. This effectively obsoletes Mihai's echocan branch. As Mihai mentioned, the results on Windows have not been spectacular thus far. Using a different API besides wmme might yield good results. Note that I have not yet given up on getting aec working with wmme. One of the primary deficiencies in iaxclient's aec implementation is that it fails to buffer the reference (output) audio stream before feeding it into the speex echo canceler; we just take the reference output audio straight from portaudio and push it into the speex echo canceler. This makes it so that the speex echo canceler's tail has to account for all of the latency through portaudio's output pipeline, over the air, into the microphone, and back through portaudio's input pipeline. The application notes for speex specifically talk about this problem. On systems with low latency, such as Mac, we can get away with this, but on Windows using wmme, the echo canceller's tail is not long enough. The other potential problem affecting aec with wmme is the switch to using a fixed samples per frame with portaudio instead of allowing portaudio to use its natural (and variable) buffer size. I suspect that this may affect how well wmme keeps the input and output audio streams synchronized. It is this input / output synchronization that is most critical to aec working. That's pretty much what I know about aec. Check out audio_encode.c and audio_portaudio.c to see the code in action. Pete |