summaryrefslogtreecommitdiffstats
path: root/gst/spectrum
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-03-14 14:48:08 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-03-14 14:48:08 +0000
commit7ce779f57981decdfa08a36501c7e9ee856b08e0 (patch)
treeb847f8018be6fe1f757a08e5941b9000bf60c8d7 /gst/spectrum
parentdbe62aba11fc589b3ec7ea335af8f97f2e047cd8 (diff)
gst/equalizer/: Add 3 and 10 band version and add missing gst_object_sync_values.
Original commit message from CVS: * gst/equalizer/Makefile.am: * gst/equalizer/gstiirequalizer.c: (_do_init), (gst_iir_equalizer_band_set_property), (gst_iir_equalizer_band_class_init), (gst_iir_equalizer_band_get_type), (gst_iir_equalizer_child_proxy_get_child_by_index), (gst_iir_equalizer_child_proxy_get_children_count), (gst_iir_equalizer_child_proxy_interface_init), (setup_filter), (gst_iir_equalizer_compute_frequencies), (gst_iir_equalizer_transform_ip), (plugin_init): * gst/equalizer/gstiirequalizer10bands.c: (gst_iir_equalizer_10bands_base_init), (gst_iir_equalizer_10bands_class_init), (gst_iir_equalizer_10bands_init), (gst_iir_equalizer_10bands_set_property), (gst_iir_equalizer_10bands_get_property): * gst/equalizer/gstiirequalizer10bands.h: * gst/equalizer/gstiirequalizer3bands.c: (gst_iir_equalizer_3bands_base_init), (gst_iir_equalizer_3bands_class_init), (gst_iir_equalizer_3bands_init), (gst_iir_equalizer_3bands_set_property), (gst_iir_equalizer_3bands_get_property): * gst/equalizer/gstiirequalizer3bands.h: * gst/equalizer/gstiirequalizernbands.c: (gst_iir_equalizer_nbands_base_init), (gst_iir_equalizer_nbands_init): Add 3 and 10 band version and add missing gst_object_sync_values. * gst/spectrum/gstspectrum.c: (gst_spectrum_event), (gst_spectrum_transform_ip): Add some comments about float support.
Diffstat (limited to 'gst/spectrum')
-rw-r--r--gst/spectrum/gstspectrum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c
index 3747b249..4cbd889b 100644
--- a/gst/spectrum/gstspectrum.c
+++ b/gst/spectrum/gstspectrum.c
@@ -405,7 +405,10 @@ gst_spectrum_transform_ip (GstBaseTransform * trans, GstBuffer * in)
samples = (const gint16 *) gst_adapter_peek (spectrum->adapter, wanted);
+ /* the current fft code is gint16 based, so supporting other formats would
+ * not really benefit now */
for (i = 0, j = 0; i < spectrum->len; i++) {
+ /* convert to mono */
for (k = 0, acc = 0; k < spectrum->channels; k++)
acc += samples[j++];
spectrum->re[i] = (gint16) (acc / spectrum->channels);