1 /* -*- c-basic-offset: 2 -*- 2 * 3 * GStreamer 4 * Copyright (C) 1999-2001 Erik Walthinsen <omega@cse.ogi.edu> 5 * 2006 Dreamlab Technologies Ltd. <mathis.hofer@dreamlab.net> 6 * 2007-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the 20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 * Boston, MA 02110-1301, USA. 22 * 23 * 24 * this windowed sinc filter is taken from the freely downloadable DSP book, 25 * "The Scientist and Engineer's Guide to Digital Signal Processing", 26 * chapter 16 27 * available at http://www.dspguide.com/ 28 * 29 */ 30 31 #ifndef __GST_AUDIO_WSINC_BAND_H__ 32 #define __GST_AUDIO_WSINC_BAND_H__ 33 34 #include <gst/gst.h> 35 #include <gst/audio/gstaudiofilter.h> 36 37 #include "audiofxbasefirfilter.h" 38 39 G_BEGIN_DECLS 40 41 #define GST_TYPE_AUDIO_WSINC_BAND \ 42 (gst_audio_wsincband_get_type()) 43 #define GST_AUDIO_WSINC_BAND(obj) \ 44 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_WSINC_BAND,GstAudioWSincBand)) 45 #define GST_AUDIO_WSINC_BAND_CLASS(klass) \ 46 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_WSINC_BAND,GstAudioWSincBandClass)) 47 #define GST_IS_AUDIO_WSINC_BAND(obj) \ 48 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_WSINC_BAND)) 49 #define GST_IS_AUDIO_WSINC_BAND_CLASS(klass) \ 50 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_WSINC_BAND)) 51 52 typedef struct _GstAudioWSincBand GstAudioWSincBand; 53 typedef struct _GstAudioWSincBandClass GstAudioWSincBandClass; 54 55 /** 56 * GstAudioWSincBand: 57 * 58 * Opaque data structure. 59 */ 60 struct _GstAudioWSincBand { 61 GstAudioFXBaseFIRFilter parent; 62 63 gint mode; 64 gint window; 65 gfloat lower_frequency, upper_frequency; 66 gint kernel_length; /* length of the filter kernel */ 67 68 /* < private > */ 69 GMutex lock; 70 }; 71 72 struct _GstAudioWSincBandClass { 73 GstAudioFilterClass parent; 74 }; 75 76 GType gst_audio_wsincband_get_type (void); 77 78 GST_ELEMENT_REGISTER_DECLARE (audiowsincband); 79 80 G_END_DECLS 81 82 #endif /* __GST_AUDIO_WSINC_BAND_H__ */ 83