Changeset a984461 for src


Ignore:
Timestamp:
Aug 20, 2015, 8:26:59 PM (9 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:
eb68991
Parents:
abffec0
Message:

src/spectral/fft.c: make sure winsize > 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    rabffec0 ra984461  
    120120aubio_fft_t * new_aubio_fft (uint_t winsize) {
    121121  aubio_fft_t * s = AUBIO_NEW(aubio_fft_t);
     122  if ((sint_t)winsize < 1) {
     123    AUBIO_ERR("fft: got winsize %d, but can not be < 1\n", winsize);
     124    goto beach;
     125  }
    122126#ifdef HAVE_FFTW3
    123127  uint_t i;
     
    171175    AUBIO_ERR("fft: can only create with sizes power of two,"
    172176              " requested %d\n", winsize);
    173     return NULL;
     177    goto beach;
    174178  }
    175179  s->winsize = winsize;
     
    184188#endif /* HAVE_FFTW3 */
    185189  return s;
     190beach:
     191  AUBIO_FREE(s);
     192  return NULL;
    186193}
    187194
Note: See TracChangeset for help on using the changeset viewer.