diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-02-22 19:17:30 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-02-22 19:18:36 +0000 |
commit | 98dccb65bf1d188eb4bf32821188dbb00678c3e1 (patch) | |
tree | 0d98e809f684780dbe8a1b5c3dd0bac36815bf88 /ext | |
parent | 731bf5d26e449d90000346d6da17f5bc0cf065fb (diff) | |
download | gst-plugins-bad-98dccb65bf1d188eb4bf32821188dbb00678c3e1.tar.gz gst-plugins-bad-98dccb65bf1d188eb4bf32821188dbb00678c3e1.tar.bz2 gst-plugins-bad-98dccb65bf1d188eb4bf32821188dbb00678c3e1.zip |
Detect libsoundtouch 1.4 and higher.
In libsoundtouch 1.4, libBPM appears to have been subsumed into
libSoundTouch, and into the soundtouch namespace.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/soundtouch/Makefile.am | 2 | ||||
-rw-r--r-- | ext/soundtouch/gstbpmdetect.cc | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/ext/soundtouch/Makefile.am b/ext/soundtouch/Makefile.am index 0c4ec826..bd23cdce 100644 --- a/ext/soundtouch/Makefile.am +++ b/ext/soundtouch/Makefile.am @@ -7,7 +7,7 @@ libgstsoundtouch_la_SOURCES = \ libgstsoundtouch_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SOUNDTOUCH_CFLAGS) libgstsoundtouch_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(SOUNDTOUCH_CFLAGS) -libgstsoundtouch_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS) $(SOUNDTOUCH_LIBS) -lBPM $(LIBM) +libgstsoundtouch_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS) $(SOUNDTOUCH_LIBS) -lm libgstsoundtouch_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstsoundtouch_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/soundtouch/gstbpmdetect.cc b/ext/soundtouch/gstbpmdetect.cc index 8d774303..23dfc185 100644 --- a/ext/soundtouch/gstbpmdetect.cc +++ b/ext/soundtouch/gstbpmdetect.cc @@ -16,6 +16,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define FLOAT_SAMPLES 1 #include <soundtouch/BPMDetect.h> @@ -29,10 +32,6 @@ #undef PACKAGE_BUGREPORT #undef PACKAGE -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include <gst/audio/audio.h> #include <gst/audio/gstaudiofilter.h> #include <math.h> @@ -47,7 +46,11 @@ GST_DEBUG_CATEGORY_STATIC (gst_bpm_detect_debug); struct _GstBPMDetectPrivate { gfloat bpm; +#if HAVE_SOUNDTOUCH_1_4 + soundtouch::BPMDetect *detect; +#else BPMDetect *detect; +#endif }; #define ALLOWED_CAPS \ @@ -197,8 +200,13 @@ gst_bpm_detect_transform_ip (GstBaseTransform * trans, GstBuffer * in) return GST_FLOW_ERROR; } +#if HAVE_SOUNDTOUCH_1_4 + bpm_detect->priv->detect = + new soundtouch::BPMDetect (filter->format.channels, filter->format.rate); +#else bpm_detect->priv->detect = new BPMDetect (filter->format.channels, filter->format.rate); +#endif } nsamples = GST_BUFFER_SIZE (in) / (4 * filter->format.channels); |