Changeset c21acb9 for src/synth


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/synth/wavetable.c

    rfe87823 rc21acb9  
    4343aubio_wavetable_t *new_aubio_wavetable(uint_t samplerate, uint_t blocksize)
    4444{
     45  uint_t i = 0;
    4546  aubio_wavetable_t *s = AUBIO_NEW(aubio_wavetable_t);
    4647  if ((sint_t)samplerate <= 0) {
     
    4849    goto beach;
    4950  }
    50   uint_t i = 0;
    5151  s->samplerate = samplerate;
    5252  s->blocksize = blocksize;
     
    115115    for (j = 0; j < output->length; j++) {
    116116      smpl_t inc = aubio_parameter_get_next_value( s->freq );
     117      smpl_t amp = aubio_parameter_get_next_value ( s->amp );
    117118      inc *= (smpl_t)(s->wavetable_length) / (smpl_t) (s->samplerate);
    118119      pos += inc;
     
    120121        pos -= s->wavetable_length;
    121122      }
    122       smpl_t amp = aubio_parameter_get_next_value ( s->amp );
    123123      for (i = 0; i < output->height; i++) {
    124124        output->data[i][j] = amp * interp_2(s->wavetable, pos);
Note: See TracChangeset for help on using the changeset viewer.