add a cast in autocorr
authorPaul Brossier <piem@altern.org>
Mon, 11 Apr 2005 16:36:29 +0000 (16:36 +0000)
committerPaul Brossier <piem@altern.org>
Mon, 11 Apr 2005 16:36:29 +0000 (16:36 +0000)
src/mathutils.c

index 1c80a35..6adcfcd 100644 (file)
@@ -410,7 +410,7 @@ void aubio_autocorr(fvec_t * input, fvec_t * output){
                 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;
         }
 }