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
commit1714161b11e2e4a919a315cecd93f8dd41ee29f7 (patch)
tree372284ab18c6bd4cfad96fb0ac62b50e4a458f80 /gst/spectrum
parent0dcd5d3a6bc654444a466b6197f8ea715b946075 (diff)
downloadgst-plugins-bad-1714161b11e2e4a919a315cecd93f8dd41ee29f7.tar.gz
gst-plugins-bad-1714161b11e2e4a919a315cecd93f8dd41ee29f7.tar.bz2
gst-plugins-bad-1714161b11e2e4a919a315cecd93f8dd41ee29f7.zip
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);