Changeset ddf04fd for src


Ignore:
Timestamp:
Dec 31, 2013, 12:31:59 AM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
5cc88f7
Parents:
67b05b4
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank_mel.c

    r67b05b4 rddf04fd  
    3535  fmat_t *filters = aubio_filterbank_get_coeffs (fb);
    3636  uint_t n_filters = filters->height, win_s = filters->length;
     37  fvec_t *lower_freqs, *upper_freqs, *center_freqs;
     38  fvec_t *triangle_heights, *fft_freqs;
    3739
    3840  uint_t fn;                    /* filter counter */
    3941  uint_t bin;                   /* bin counter */
     42
     43  smpl_t riseInc, downInc;
    4044
    4145  /* freqs define the bands of triangular overlapping windows.
     
    5761
    5862  /* convenience reference to lower/center/upper frequency for each triangle */
    59   fvec_t *lower_freqs = new_fvec (n_filters);
    60   fvec_t *upper_freqs = new_fvec (n_filters);
    61   fvec_t *center_freqs = new_fvec (n_filters);
     63  lower_freqs = new_fvec (n_filters);
     64  upper_freqs = new_fvec (n_filters);
     65  center_freqs = new_fvec (n_filters);
    6266
    6367  /* height of each triangle */
    64   fvec_t *triangle_heights = new_fvec (n_filters);
     68  triangle_heights = new_fvec (n_filters);
    6569
    6670  /* lookup table of each bin frequency in hz */
    67   fvec_t *fft_freqs = new_fvec (win_s);
     71  fft_freqs = new_fvec (win_s);
    6872
    6973  /* fill up the lower/center/upper */
     
    113117
    114118    /* compute positive slope step size */
    115     smpl_t riseInc =
     119    riseInc =
    116120        triangle_heights->data[fn] /
    117121        (center_freqs->data[fn] - lower_freqs->data[fn]);
     
    129133
    130134    /* compute negative slope step size */
    131     smpl_t downInc =
     135    downInc =
    132136        triangle_heights->data[fn] /
    133137        (upper_freqs->data[fn] - center_freqs->data[fn]);
     
    177181  uint_t fn;                    /* filter counter */
    178182
     183  smpl_t lastlinearCF;
     184
    179185  /* buffers to compute filter frequencies */
    180186  fvec_t *freqs = new_fvec (n_filters + 2);
     
    184190    freqs->data[fn] = lowestFrequency + fn * linearSpacing;
    185191  }
    186   smpl_t lastlinearCF = freqs->data[fn - 1];
     192  lastlinearCF = freqs->data[fn - 1];
    187193
    188194  /* second step: fill all the log filter frequencies */
Note: See TracChangeset for help on using the changeset viewer.