shithub: aubio

Download patch

ref: 78c21cf24af6b083dfbdee5892ece4411529fafa
parent: 5644069196e50ebdb494ddd3d9b294fe1e20de7f
author: Paul Brossier <piem@piem.org>
date: Mon Dec 30 14:25:04 EST 2013

src/spectral/mfcc.c: improve build with -Wdeclaration-after-statement

--- a/src/spectral/mfcc.c
+++ b/src/spectral/mfcc.c
@@ -51,6 +51,7 @@
 
   /* allocate space for mfcc object */
   aubio_mfcc_t *mfcc = AUBIO_NEW (aubio_mfcc_t);
+  smpl_t scaling;
 
   uint_t i, j;
 
@@ -70,7 +71,7 @@
 
   /* compute DCT transform dct_coeffs[i][j] as
      cos ( j * (i+.5) * PI / n_filters ) */
-  smpl_t scaling = 1. / SQRT (n_filters / 2.);
+  scaling = 1. / SQRT (n_filters / 2.);
   for (i = 0; i < n_filters; i++) {
     for (j = 0; j < n_coefs; j++) {
       mfcc->dct_coeffs->data[i][j] =