List Info

Thread: Re: speex echo cancellation tested?




Re: speex echo cancellation tested?
country flaguser name
United States
2008-04-24 11:24:51
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.
> >
> >  Any clue what I need to do to fix this issue? 
I've got pkgconfig
> >  installed on my system as well as the necessary
version of autoconf.
> 
> Perhaps it is complaining because the PKG_REQUIRES
variable is being
> referenced before it is ever declared. Try writing
PKG_REQUIRES=""
> somewhere before line 213 (e.g. 207).
> 
> Pete

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:

matt:~/src/iaxclient/branches/team/mihai/echocan> svn
diff

Index: iaxclient.pc.in
============================================================
=======
--- iaxclient.pc.in     (revision 1421)
+++ iaxclient.pc.in     (working copy)
 -9,5
+9,5 
 Libs: -L$ -liaxclient PTHREAD_LIBS
 Libs.private: GSM_LIBS
 Cflags: -I$
-Requires.private: portaudio-2.0 speex PKG_REQUIRES
+Requires.private: portaudio-2.0 speex PACKAGE_REQUIRES

Index: configure.ac
============================================================
=======
--- configure.ac        (revision 1421)
+++ configure.ac        (working copy)
 -205,12
+205,14 
 fi
 AM_CONDITIONAL(VIDEO, test x$with_video = xyes)

+PACKAGE_REQUIRES=""
+
 has_ogg=no
 if test ! x$with_ogg = xno; then
 PKG_CHECK_MODULES(OGG, [ogg >= 1.1.3],has_ogg=yes)
 if test x$has_ogg = xyes; then
    AC_DEFINE(USE_OGG, 1, [OGG])
-   PKG_REQUIRES="$PKG_REQUIRES ogg"
+   PACKAGE_REQUIRES="$PACKAGE_REQUIRES ogg"
 elif test ! x$with_ogg = xauto ; then
    AC_MSG_ERROR([
       libogg is required to build this package!
 -238,7
+240,7 
 PKG_CHECK_MODULES(THEORA, [theora >=
1.0alpha7],has_theora=yes)
 if test x$has_theora = xyes; then
    AC_DEFINE(USE_THEORA, 1, [THEORA])
-   PKG_REQUIRES="$PKG_REQUIRES theora"
+   PACKAGE_REQUIRES="$PACKAGE_REQUIRES theora"
 elif test ! x$with_theora = xauto ; then
    AC_MSG_ERROR([
       libtheora is required to build this package!
 -254,7
+256,7 
    PKG_CHECK_MODULES(VIDCAP, [vidcap >=
0.1],has_vidcap=yes)
    if test x$has_vidcap = xyes; then
       AC_DEFINE(USE_VIDCAP, 1, [VIDCAP])
-      PKG_REQUIRES="$PKG_REQUIRES vidcap"
+      PACKAGE_REQUIRES="$PACKAGE_REQUIRES
vidcap"
    elif test ! x$with_vidcap = xauto ; then
       AC_MSG_ERROR([
          libvidcap is required to build this package!
 -270,7
+272,7 
 PKG_CHECK_MODULES(FFMPEG, [libavcodec >=
51.40.3],has_ffmpeg=yes)
 if test x$has_ffmpeg = xyes; then
    AC_DEFINE(USE_FFMPEG, 1, [FFMPEG])
-   PKG_REQUIRES="$PKG_REQUIRES ffmpeg"
+   PACKAGE_REQUIRES="$PACKAGE_REQUIRES ffmpeg"
 elif test ! x$with_ffmpeg = xauto ; then
    AC_MSG_ERROR([
       FFmpeg is required to build this package!
 -467,7
+469,7 
 done

 AC_SUBST(CLIENTS)
-AC_SUBST(PKG_REQUIRES)
+AC_SUBST(PACKAGE_REQUIRES)

 AC_CONFIG_FILES([
       Makefile



------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference 
Don't miss this year's exciting event. There's still time to
save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: speex echo cancellation tested?
user name
2008-04-24 14:20:41
Hi Matt

On Thu, Apr 24, 2008 at 12:24 PM, Matthew Crane
<mcranenovell.com> 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

------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference 
Don't miss this year's exciting event. There's still time to
save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )