GNOME Bugzilla – Bug 647510
audiowsinclimit uses the wrong limits for the range of the kernel elements
Last modified: 2011-04-13 16:01:57 UTC
Created attachment 185767 [details] [review] change len -> len-1 where appropiate in the high- and low-pass filters Hi, In audiowsinclimit.c the kernel elements and windows are written as if the counter went from 0 to len, included. But they should go from 0 to len-1. The confusion comes from using the reference http://www.dspguide.com/ch16/2.htm where the counter goes up to M = len-1. The attached patch corrects this issue, and also handles better the case of a filter with an even number of elements. Jordi
commit de7a9765315f7d977d1b29b13caf7a0a4d39f4f3 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Apr 13 18:01:01 2011 +0200 audiowsincband: Fix range of kernel elements (lim -> lim-1) commit 4fd5fea2b25b9a1588b54aa8c8c38236a672c5ed Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Apr 13 18:00:44 2011 +0200 audiowsinclimit: Add some more braces to make the code more readable commit 766e437af188c82d966cd5f459577098fbdc67ec Author: Jordi Burguet-Castell <jordi.burguet-castell@ligo.org> Date: Mon Apr 11 18:40:30 2011 -0500 audiowsinclimit: Fix range of kernel elements (lim -> lim-1) in high/low-pass filters