Changeset 4f4299d for src


Ignore:
Timestamp:
Oct 11, 2009, 12:40:04 PM (15 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:
74a4865
Parents:
8979752
Message:

src/spectral/fft.c: make sure we set allocated vectors to 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    r8979752 r4f4299d  
    8484aubio_fft_t * new_aubio_fft(uint_t winsize, uint_t channels) {
    8585  aubio_fft_t * s = AUBIO_NEW(aubio_fft_t);
     86  uint_t i;
    8687  s->winsize  = winsize;
    8788  s->channels = channels;
     
    102103  s->pbw = fftw_plan_r2r_1d(winsize, s->specdata, s->out, FFTW_HC2R, FFTW_ESTIMATE);
    103104#endif
     105  for (i = 0; i < s->winsize; i++) {
     106    s->in[i] = 0.;
     107    s->out[i] = 0.;
     108  }
     109  for (i = 0; i < s->fft_size; i++) {
     110    s->specdata[i] = 0.;
     111  }
    104112  return s;
    105113}
Note: See TracChangeset for help on using the changeset viewer.