shithub: aubio

Download patch

ref: 84941cbd7cf1e0bcd0a04ce76f18abdc248a462e
parent: cf7c76a0350408b569c08743c1bb1180b777140a
author: Paul Brossier <piem@altern.org>
date: Mon Apr 11 12:36:29 EDT 2005

add a cast in autocorr

--- a/src/mathutils.c
+++ b/src/mathutils.c
@@ -410,7 +410,7 @@
                 for(j=i;j<length;j++){
                         tmp += data[j-i]*data[j]; 
                 }
-                acf[i] = tmp/(length-i);
+                acf[i] = tmp /(smpl_t)(length-i);
                 tmp = 0.0;
         }
 }