summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-10-31 22:29:57 (GMT)
committerStefan Kost <ensonic@users.sf.net>2009-10-31 22:31:48 (GMT)
commit03d2f4bdec9ad0b558d973c45ee685cbf33c598a (patch)
tree0393a009eb89ccd69d450bebd2f1126f18197ea1
parent71044b37b66b309716267d48f6a7ae343558914e (diff)
level: fix decay to be smooth
The length not having any fractional part as it was promoted to gdouble after dividing two guint64.
-rw-r--r--gst/level/gstlevel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c
index b8b99dc..10fa10a 100644
--- a/gst/level/gstlevel.c
+++ b/gst/level/gstlevel.c
@@ -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);