Changeset d897aae


Ignore:
Timestamp:
Feb 16, 2016, 3:43:14 PM (8 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:
fb5838a
Parents:
d7f3c88
Message:

src/spectral, src/onset, src/tempo: make sure win_size > 1

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    rd7f3c88 rd897aae  
    187187    AUBIO_ERR("onset: got hop_size %d, but can not be < 1\n", hop_size);
    188188    goto beach;
    189   } else if ((sint_t)buf_size < 1) {
    190     AUBIO_ERR("onset: got buffer_size %d, but can not be < 1\n", buf_size);
     189  } else if ((sint_t)buf_size < 2) {
     190    AUBIO_ERR("onset: got buffer_size %d, but can not be < 2\n", buf_size);
    191191    goto beach;
    192192  } else if (buf_size < hop_size) {
  • src/spectral/fft.c

    rd7f3c88 rd897aae  
    144144aubio_fft_t * new_aubio_fft (uint_t winsize) {
    145145  aubio_fft_t * s = AUBIO_NEW(aubio_fft_t);
    146   if ((sint_t)winsize < 1) {
    147     AUBIO_ERR("fft: got winsize %d, but can not be < 1\n", winsize);
     146  if ((sint_t)winsize < 2) {
     147    AUBIO_ERR("fft: got winsize %d, but can not be < 2\n", winsize);
    148148    goto beach;
    149149  }
  • src/spectral/phasevoc.c

    rd7f3c88 rd897aae  
    8080    AUBIO_ERR("pvoc: got hop_size %d, but can not be < 1\n", hop_s);
    8181    goto beach;
    82   } else if ((sint_t)win_s < 1) {
    83     AUBIO_ERR("pvoc: got buffer_size %d, but can not be < 1\n", win_s);
     82  } else if ((sint_t)win_s < 2) {
     83    AUBIO_ERR("pvoc: got buffer_size %d, but can not be < 2\n", win_s);
    8484    goto beach;
    8585  } else if (win_s < hop_s) {
  • src/tempo/tempo.c

    rd7f3c88 rd897aae  
    174174    AUBIO_ERR("tempo: got hop size %d, but can not be < 1\n", hop_size);
    175175    goto beach;
    176   } else if ((sint_t)buf_size < 1) {
    177     AUBIO_ERR("tempo: got window size %d, but can not be < 1\n", buf_size);
     176  } else if ((sint_t)buf_size < 2) {
     177    AUBIO_ERR("tempo: got window size %d, but can not be < 2\n", buf_size);
    178178    goto beach;
    179179  } else if (buf_size < hop_size) {
Note: See TracChangeset for help on using the changeset viewer.