summaryrefslogtreecommitdiffstats
path: root/gst/audiofx/audiowsincband.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-08-12 15:41:57 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-08-12 15:41:57 +0000
commite8030a13568de050e26afe0c335713051d3b2a71 (patch)
tree74490fcaa12cbdf6144656c5e6d0b00533e3152a /gst/audiofx/audiowsincband.c
parent39321cf1f760f907755180873927a1a9ff47f8a9 (diff)
gst/filter/: Improve debugging a bit.
Original commit message from CVS: * gst/filter/gstbpwsinc.c: (bpwsinc_build_kernel): * gst/filter/gstlpwsinc.c: (lpwsinc_build_kernel): Improve debugging a bit.
Diffstat (limited to 'gst/audiofx/audiowsincband.c')
-rw-r--r--gst/audiofx/audiowsincband.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c
index f2bfda74..d9690b6c 100644
--- a/gst/audiofx/audiowsincband.c
+++ b/gst/audiofx/audiowsincband.c
@@ -338,8 +338,6 @@ bpwsinc_build_kernel (GstBPWSinc * self)
return;
}
- self->have_kernel = TRUE;
-
/* Clamp frequencies */
self->lower_frequency =
CLAMP (self->lower_frequency, 0.0,
@@ -354,10 +352,13 @@ bpwsinc_build_kernel (GstBPWSinc * self)
self->upper_frequency = tmp;
}
- /* fill the lp kernel */
- GST_DEBUG ("bpwsinc: initializing LP kernel of length %d with cut-off %f",
- len, self->lower_frequency);
+ GST_DEBUG ("bpwsinc: initializing filter kernel of length %d "
+ "with lower frequency %.2lf Hz "
+ ", upper frequency %.2lf Hz for mode %s",
+ len, self->lower_frequency, self->upper_frequency,
+ (self->mode == MODE_BAND_PASS) ? "band-pass" : "band-reject");
+ /* fill the lp kernel */
w = 2 * M_PI * (self->lower_frequency / GST_AUDIO_FILTER (self)->format.rate);
kernel_lp = g_new (gdouble, len);
for (i = 0; i < len; ++i) {
@@ -383,9 +384,6 @@ bpwsinc_build_kernel (GstBPWSinc * self)
kernel_lp[i] /= sum;
/* fill the hp kernel */
- GST_DEBUG ("bpwsinc: initializing HP kernel of length %d with cut-off %f",
- len, self->upper_frequency);
-
w = 2 * M_PI * (self->upper_frequency / GST_AUDIO_FILTER (self)->format.rate);
kernel_hp = g_new (gdouble, len);
for (i = 0; i < len; ++i) {
@@ -438,9 +436,10 @@ bpwsinc_build_kernel (GstBPWSinc * self)
/* set up the residue memory space */
if (self->residue)
g_free (self->residue);
-
self->residue =
g_new0 (gdouble, len * GST_AUDIO_FILTER (self)->format.channels);
+
+ self->have_kernel = TRUE;
}
/* GstAudioFilter vmethod implementations */