From 23a2e7d7adad5ce71446e83134f0c84aba5393e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 26 Jan 2008 13:24:17 +0000 Subject: [PATCH] Add support for libsoundtouch 1.3.1 and add an ugly workaround for the header definined PACKAGE and other variables f... Original commit message from CVS: * configure.ac: * ext/soundtouch/gstpitch.cc: Add support for libsoundtouch 1.3.1 and add an ugly workaround for the header definined PACKAGE and other variables for which we need our own values from config.h. --- ChangeLog | 8 ++++++++ configure.ac | 8 +++++--- ext/soundtouch/gstpitch.cc | 15 ++++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d79177776e..ceb9f16801 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-26 Sebastian Dröge + + * configure.ac: + * ext/soundtouch/gstpitch.cc: + Add support for libsoundtouch 1.3.1 and add an ugly workaround for + the header definined PACKAGE and other variables for which we need + our own values from config.h. + 2008-01-26 Tim-Philipp Müller * configure.ac: diff --git a/configure.ac b/configure.ac index 66992b06c6..f2477cef79 100644 --- a/configure.ac +++ b/configure.ac @@ -885,9 +885,11 @@ AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [ dnl *** soundtouch *** translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true) AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [ - PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch, HAVE_SOUNDTOUCH=yes, [ - HAVE_SOUNDTOUCH=no - AC_MSG_RESULT(no)]) + PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0, + HAVE_SOUNDTOUCH=yes, + PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch, + HAVE_SOUNDTOUCH=yes, + HAVE_SOUNDTOUCH=no)) AC_SUBST(SOUNDTOUCH_CFLAGS) AC_SUBST(SOUNDTOUCH_LIBS) if test "x$HAVE_CXX" != "xyes"; then diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc index ad53f477b1..38c7d2d391 100644 --- a/ext/soundtouch/gstpitch.cc +++ b/ext/soundtouch/gstpitch.cc @@ -17,6 +17,18 @@ * */ +#define FLOAT_SAMPLES 1 +#include +/* FIXME: workaround for SoundTouch.h of version 1.3.1 defining those + * variables while it shouldn't. */ +#undef VERSION +#undef PACKAGE_VERSION +#undef PACKAGE_TARNAME +#undef PACKAGE_STRING +#undef PACKAGE_NAME +#undef PACKAGE_BUGREPORT +#undef PACKAGE + #ifdef HAVE_CONFIG_H # include #endif @@ -26,9 +38,6 @@ #include "gstpitch.hh" #include -#define FLOAT_SAMPLES -#include - /* wtf ? #ifdef G_PARAM_READWRITE # undef G_PARAM_READWRITE