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 1c80a35601724fddc065da763bda023621e13a95..6adcfcd42e799912fa490808104499f3913d2907 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;
         }
 }