level: fix decay to be smooth
authorStefan Kost <ensonic@users.sf.net>
Sat, 31 Oct 2009 22:29:57 +0000 (00:29 +0200)
committerStefan Kost <ensonic@users.sf.net>
Sat, 31 Oct 2009 22:31:48 +0000 (00:31 +0200)
The length not having any fractional part as it was promoted to gdouble after
dividing two guint64.

gst/level/gstlevel.c

index b8b99dc..10fa10a 100644 (file)
@@ -621,7 +621,7 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in)
       gdouble falloff;
       gdouble length;           /* length of falloff time in seconds */
 
-      length = (gdouble) (falloff_time / GST_SECOND);
+      length = (gdouble) falloff_time / (gdouble) GST_SECOND;
       falloff_dB = filter->decay_peak_falloff * length;
       falloff = pow (10, falloff_dB / -20.0);