diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
commit | 6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch) | |
tree | 82b5546809a42a56a7bc18bacf8ed6e209ad006e /gst/audiofx | |
parent | d07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff) |
don't mix tabs and spaces
Original commit message from CVS:
don't mix tabs and spaces
Diffstat (limited to 'gst/audiofx')
-rw-r--r-- | gst/audiofx/audiowsincband.c | 44 | ||||
-rw-r--r-- | gst/audiofx/audiowsinclimit.c | 26 |
2 files changed, 35 insertions, 35 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c index a848cc26..ba0f2d67 100644 --- a/gst/audiofx/audiowsincband.c +++ b/gst/audiofx/audiowsincband.c @@ -35,8 +35,8 @@ #endif #include <gst/gst.h> #include "gstfilter.h" -#include <math.h> /* M_PI */ -#include <string.h> /* memmove */ +#include <math.h> /* M_PI */ +#include <string.h> /* memmove */ /* elementfactory information */ static GstElementDetails gst_bpwsinc_details = GST_ELEMENT_DETAILS ("BPWSinc", @@ -80,10 +80,10 @@ struct _GstBPWSinc double frequency; double lower_frequency, upper_frequency; - int wing_size; /* length of a "wing" of the filter; - actual length is 2 * wing_size + 1 */ + int wing_size; /* length of a "wing" of the filter; + actual length is 2 * wing_size + 1 */ - gfloat *residue; /* buffer for left-over samples from previous buffer */ + gfloat *residue; /* buffer for left-over samples from previous buffer */ double *kernel; }; @@ -125,7 +125,7 @@ gst_bpwsinc_get_type (void) }; bpwsinc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstBPWSinc", - &bpwsinc_info, 0); + &bpwsinc_info, 0); } return bpwsinc_type; } @@ -157,16 +157,16 @@ gst_bpwsinc_class_init (GstBPWSincClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOWER_FREQUENCY, g_param_spec_double ("lower-frequency", "Lower Frequency", - "Cut-off lower frequency (relative to sample rate)", - 0.0, 0.5, 0, G_PARAM_READWRITE)); + "Cut-off lower frequency (relative to sample rate)", + 0.0, 0.5, 0, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_UPPER_FREQUENCY, g_param_spec_double ("upper-frequency", "Upper Frequency", - "Cut-off upper frequency (relative to sample rate)", - 0.0, 0.5, 0, G_PARAM_READWRITE)); + "Cut-off upper frequency (relative to sample rate)", + 0.0, 0.5, 0, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LENGTH, g_param_spec_int ("length", "Length", - "N such that the filter length = 2N + 1", - 1, G_MAXINT, 1, G_PARAM_READWRITE)); + "N such that the filter length = 2N + 1", + 1, G_MAXINT, 1, G_PARAM_READWRITE)); gobject_class->set_property = gst_bpwsinc_set_property; gobject_class->get_property = gst_bpwsinc_get_property; @@ -213,17 +213,17 @@ gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps) len = filter->wing_size; /* fill the lp kernel */ GST_DEBUG ("bpwsinc: initializing LP kernel of length %d with cut-off %f", - len * 2 + 1, filter->lower_frequency); + len * 2 + 1, filter->lower_frequency); kernel_lp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); for (i = 0; i <= len * 2; ++i) { if (i == len) - kernel_lp[i] = 2 * M_PI * filter->lower_frequency; + kernel_lp[i] = 2 * M_PI * filter->lower_frequency; else - kernel_lp[i] = sin (2 * M_PI * filter->lower_frequency * (i - len)) - / (i - len); + kernel_lp[i] = sin (2 * M_PI * filter->lower_frequency * (i - len)) + / (i - len); /* Blackman windowing */ kernel_lp[i] *= (0.42 - 0.5 * cos (M_PI * i / len) - + 0.08 * cos (2 * M_PI * i / len)); + + 0.08 * cos (2 * M_PI * i / len)); } /* normalize for unity gain at DC @@ -236,17 +236,17 @@ gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps) /* fill the hp kernel */ GST_DEBUG ("bpwsinc: initializing HP kernel of length %d with cut-off %f", - len * 2 + 1, filter->upper_frequency); + len * 2 + 1, filter->upper_frequency); kernel_hp = (double *) g_malloc (sizeof (double) * (2 * len + 1)); for (i = 0; i <= len * 2; ++i) { if (i == len) - kernel_hp[i] = 2 * M_PI * filter->upper_frequency; + kernel_hp[i] = 2 * M_PI * filter->upper_frequency; else - kernel_hp[i] = sin (2 * M_PI * filter->upper_frequency * (i - len)) - / (i - len); + kernel_hp[i] = sin (2 * M_PI * filter->upper_frequency * (i - len)) + / (i - len); /* Blackman windowing */ kernel_hp[i] *= (0.42 - 0.5 * cos (M_PI * i / len) - + 0.08 * cos (2 * M_PI * i / len)); + + 0.08 * cos (2 * M_PI * i / len)); } /* normalize for unity gain at DC diff --git a/gst/audiofx/audiowsinclimit.c b/gst/audiofx/audiowsinclimit.c index 0ce33b32..285c2edb 100644 --- a/gst/audiofx/audiowsinclimit.c +++ b/gst/audiofx/audiowsinclimit.c @@ -35,8 +35,8 @@ #endif #include <gst/gst.h> #include "gstfilter.h" -#include <math.h> /* M_PI */ -#include <string.h> /* memmove */ +#include <math.h> /* M_PI */ +#include <string.h> /* memmove */ static GstElementDetails gst_lpwsinc_details = GST_ELEMENT_DETAILS ("LPWSinc", "Filter/Effect/Audio", @@ -77,10 +77,10 @@ struct _GstLPWSinc GstPad *sinkpad, *srcpad; double frequency; - int wing_size; /* length of a "wing" of the filter; - actual length is 2 * wing_size + 1 */ + int wing_size; /* length of a "wing" of the filter; + actual length is 2 * wing_size + 1 */ - gfloat *residue; /* buffer for left-over samples from previous buffer */ + gfloat *residue; /* buffer for left-over samples from previous buffer */ double *kernel; }; @@ -122,7 +122,7 @@ gst_lpwsinc_get_type (void) }; lpwsinc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstLPWSinc", - &lpwsinc_info, 0); + &lpwsinc_info, 0); } return lpwsinc_type; } @@ -154,12 +154,12 @@ gst_lpwsinc_class_init (GstLPWSincClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY, g_param_spec_double ("frequency", "Frequency", - "Cut-off Frequency relative to sample rate)", - 0.0, 0.5, 0, G_PARAM_READWRITE)); + "Cut-off Frequency relative to sample rate)", + 0.0, 0.5, 0, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LENGTH, g_param_spec_int ("length", "Length", - "N such that the filter length = 2N + 1", - 1, G_MAXINT, 1, G_PARAM_READWRITE)); + "N such that the filter length = 2N + 1", + 1, G_MAXINT, 1, G_PARAM_READWRITE)); gobject_class->set_property = gst_lpwsinc_set_property; gobject_class->get_property = gst_lpwsinc_get_property; @@ -210,10 +210,10 @@ gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps) for (i = 0; i <= len * 2; ++i) { if (i == len) - filter->kernel[i] = 2 * M_PI * filter->frequency; + filter->kernel[i] = 2 * M_PI * filter->frequency; else - filter->kernel[i] = sin (2 * M_PI * filter->frequency * (i - len)) - / (i - len); + filter->kernel[i] = sin (2 * M_PI * filter->frequency * (i - len)) + / (i - len); /* windowing */ filter->kernel[i] *= (0.54 - 0.46 * cos (M_PI * i / len)); } |