Changeset c21acb9 for src/pitch


Ignore:
Timestamp:
Dec 31, 2013, 12:20:28 AM (10 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:
5644069
Parents:
fe87823
Message:

src/: improve build with -Wdeclaration-after-statement

Location:
src/pitch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitch.c

    rfe87823 rc21acb9  
    367367aubio_pitch_do_specacf (aubio_pitch_t * p, fvec_t * ibuf, fvec_t * out)
    368368{
     369  smpl_t pitch = 0., period;
    369370  aubio_pitch_slideblock (p, ibuf);
    370371  aubio_pitchspecacf_do (p->p_object, p->buf, out);
    371372  //out->data[0] = aubio_bintofreq (out->data[0], p->samplerate, p->bufsize);
    372   smpl_t pitch = 0., period = out->data[0];
     373  period = out->data[0];
    373374  if (period > 0) {
    374375    pitch = p->samplerate / period;
  • src/pitch/pitchspecacf.c

    rfe87823 rc21acb9  
    5757aubio_pitchspecacf_do (aubio_pitchspecacf_t * p, fvec_t * input, fvec_t * output)
    5858{
    59   uint_t l;
     59  uint_t l, tau;
    6060  fvec_t *fftout = p->fftout;
    6161  // window the input
     
    7575  }
    7676  // get the minimum
    77   uint_t tau = fvec_min_elem (p->acf);
     77  tau = fvec_min_elem (p->acf);
    7878  // get the interpolated minimum
    7979  output->data[0] = fvec_quadratic_peak_pos (p->acf, tau) * 2.;
  • src/pitch/pitchyinfft.c

    rfe87823 rc21acb9  
    5858new_aubio_pitchyinfft (uint_t samplerate, uint_t bufsize)
    5959{
     60  uint_t i = 0, j = 1;
     61  smpl_t freq = 0, a0 = 0, a1 = 0, f0 = 0, f1 = 0;
    6062  aubio_pitchyinfft_t *p = AUBIO_NEW (aubio_pitchyinfft_t);
    6163  p->winput = new_fvec (bufsize);
     
    6769  p->win = new_aubio_window ("hanningz", bufsize);
    6870  p->weight = new_fvec (bufsize / 2 + 1);
    69   uint_t i = 0, j = 1;
    70   smpl_t freq = 0, a0 = 0, a1 = 0, f0 = 0, f1 = 0;
    7171  for (i = 0; i < p->weight->length; i++) {
    7272    freq = (smpl_t) i / (smpl_t) bufsize *(smpl_t) samplerate;
Note: See TracChangeset for help on using the changeset viewer.