From 1714161b11e2e4a919a315cecd93f8dd41ee29f7 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 14 Mar 2007 14:48:08 +0000 Subject: 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. --- gst/spectrum/gstspectrum.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gst/spectrum') 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); -- cgit v1.2.1