Release 1.1.4
[platform/upstream/gst-plugins-good.git] / gst / audiofx / audiowsinclimit.h
index b781a42..e7fa915 100644 (file)
@@ -3,6 +3,7 @@
  * GStreamer
  * Copyright (C) 1999-2001 Erik Walthinsen <omega@cse.ogi.edu>
  *               2006 Dreamlab Technologies Ltd. <mathis.hofer@dreamlab.net>
+ *               2007-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -16,8 +17,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  * 
  * 
  * this windowed sinc filter is taken from the freely downloadable DSP book,
 #include <gst/gst.h>
 #include <gst/audio/gstaudiofilter.h>
 
+#include "audiofxbasefirfilter.h"
+
 G_BEGIN_DECLS
 
 #define GST_TYPE_AUDIO_WSINC_LIMIT \
-  (audio_wsinclimit_get_type())
+  (gst_audio_wsinclimit_get_type())
 #define GST_AUDIO_WSINC_LIMIT(obj) \
   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_WSINC_LIMIT,GstAudioWSincLimit))
 #define GST_AUDIO_WSINC_LIMIT_CLASS(klass) \
@@ -49,38 +52,28 @@ G_BEGIN_DECLS
 typedef struct _GstAudioWSincLimit GstAudioWSincLimit;
 typedef struct _GstAudioWSincLimitClass GstAudioWSincLimitClass;
 
-typedef void (*GstAudioWSincLimitProcessFunc) (GstAudioWSincLimit *, guint8 *, guint8 *, guint);
-
 /**
  * GstAudioWSincLimit:
  *
  * Opaque data structure.
  */
 struct _GstAudioWSincLimit {
-  GstAudioFilter element;
-
-  /* < private > */
-  GstAudioWSincLimitProcessFunc process;
+  GstAudioFXBaseFIRFilter parent;
 
   gint mode;
   gint window;
   gfloat cutoff;
-  gint kernel_length;           /* length of the filter kernel */
+  gint kernel_length;
 
-  gdouble *residue;             /* buffer for left-over samples from previous buffer */
-  gdouble *kernel;              /* filter kernel */
-  gboolean have_kernel;
-  gint residue_length;
-  guint64 latency;
-  GstClockTime next_ts;
-  guint64 next_off;
+  /* < private > */
+  GMutex lock;
 };
 
 struct _GstAudioWSincLimitClass {
-  GstAudioFilterClass parent_class;
+  GstAudioFXBaseFIRFilterClass parent;
 };
 
-GType audio_wsinclimit_get_type (void);
+GType gst_audio_wsinclimit_get_type (void);
 
 G_END_DECLS