From 6edf8c43268488ad21d5ba50e02ebc533c6c12f9 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Sat, 3 Nov 2007 19:50:11 +0000 Subject: gst/equalizer/: Allow setting 0 as bandwidth and handle this correctly. Original commit message from CVS: * gst/equalizer/demo.c: (main): * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_band_class_init), (setup_filter): Allow setting 0 as bandwidth and handle this correctly. Also handle a bandwidth of rate/2 properly. * gst/equalizer/gstiirequalizernbands.c: (gst_iir_equalizer_nbands_class_init): Make it possible to generate a N-band equalizer with 1 bands. The previous limit of 2 was caused by a nowadays replaced calculation doing a division by zero if number of bands was 1. --- tests/examples/equalizer/demo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/examples') diff --git a/tests/examples/equalizer/demo.c b/tests/examples/equalizer/demo.c index 7e7fae4a..cf361a9d 100644 --- a/tests/examples/equalizer/demo.c +++ b/tests/examples/equalizer/demo.c @@ -208,7 +208,7 @@ main (int argc, char *argv[]) G_CALLBACK (on_gain_changed), (gpointer) band); gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0); - widget = gtk_vscale_new_with_range (1.0, 20000.0, 5.0); + widget = gtk_vscale_new_with_range (0.0, 20000.0, 5.0); gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_range_set_value (GTK_RANGE (widget), bw); -- cgit