]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Fix build of pph plugin with speex-1.2rc1
authorTakashi Iwai <tiwai@suse.de>
Wed, 21 Jan 2009 15:53:36 +0000 (16:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 21 Jan 2009 15:53:36 +0000 (16:53 +0100)
The resampler code is moved to libspeexdsp instead of libspeex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
configure.in
mix/pcm_upmix.c
pph/Makefile.am

index 837934f6fecf7cf6cdab41c6b731480f73f88864..ce95b5d852a79078d5b03d60324833f1ce7adfcf 100644 (file)
@@ -106,16 +106,18 @@ AC_SUBST(AVCODEC_CFLAGS)
 AC_SUBST(AVCODEC_LIBS)
 AC_SUBST(AVCODEC_HEADER)
 
-USE_LIBSPEEX=""
+PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
+AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
+
 AC_ARG_WITH([speex],
        AS_HELP_STRING([--with-speex={builtin|lib|no}],
                [build speex resampler (built-in code, link with external lib, or no build)]),
        [PPH=$withval], [PPH="lib"])
 
+USE_LIBSPEEX=""
 if test "$PPH" = "lib"; then
-       PKG_CHECK_MODULES(speex, [speex >= 1.2], [USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
-       if test "$USE_LIBSPEEX" = "yes"; then
-               AC_CHECK_LIB([speex], [speex_resampler_init],
+       if test "$HAVE_SPEEXDSP" = "yes"; then
+               AC_CHECK_LIB([speexdsp], [speex_resampler_init],
                        [USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
        fi
        if test "$USE_LIBSPEEX" = "yes"; then
@@ -197,6 +199,6 @@ if test "$HAVE_AVCODEC" = "yes"; then
 fi
 echo "Speex rate plugin:  $PPH"
 if test "$PPH" = "lib"; then
-  echo "  speex_CFLAGS: $speex_CFLAGS"
-  echo "  speex_LIBS: $speex_LIBS"
+  echo "  speexdsp_CFLAGS: $speexdsp_CFLAGS"
+  echo "  speexdsp_LIBS: $speexdsp_LIBS"
 fi
index f8201aede6d88f52f5731c8105fc12f883366f50..7338426ac0be465191ae51ef0b0e008d853d8720 100644 (file)
@@ -352,7 +352,6 @@ SND_PCM_PLUGIN_DEFINE_FUNC(upmix)
                                return err;
                        }
                        delay = val;
-                       continue;
                }
                if (strcmp(id, "channels") == 0) {
                        long val;
index d24176c6c7e04fd8969663861575248e022e66f6..551e5bd6ab23d87adb92942e41e5f9243729743e 100644 (file)
@@ -2,15 +2,16 @@ asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
 
 asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
 
-AM_CFLAGS = -DVAR_ARRAYS -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX -Wall -g @ALSA_CFLAGS@
+AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
 AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
 
 libasound_module_rate_speexrate_la_SOURCES = rate_speexrate.c
 libasound_module_rate_speexrate_la_LIBADD = @ALSA_LIBS@
 if USE_LIBSPEEX
-AM_CFLAGS += @speex_CFLAGS@
-libasound_module_rate_speexrate_la_LIBADD += @speex_LIBS@
+AM_CFLAGS += @speexdsp_CFLAGS@
+libasound_module_rate_speexrate_la_LIBADD += @speexdsp_LIBS@
 else
+AM_CFLAGS += -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX 
 libasound_module_rate_speexrate_la_SOURCES += resample.c
 libasound_module_rate_speexrate_la_LIBADD += -lm
 endif