Changeset 79b54ea for src


Ignore:
Timestamp:
Aug 26, 2014, 5:24:56 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:
0ff4434
Parents:
2722dc7
Message:

src/synth/sampler.c: make sure blocksize > 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/synth/sampler.c

    r2722dc7 r79b54ea  
    4040{
    4141  aubio_sampler_t *s = AUBIO_NEW(aubio_sampler_t);
     42  if ((sint_t)blocksize < 1) {
     43    AUBIO_ERR("sampler: got blocksize %d, but can not be < 1\n", blocksize);
     44    goto beach;
     45  }
    4246  s->samplerate = samplerate;
    4347  s->blocksize = blocksize;
     
    4751  s->playing = 0;
    4852  return s;
     53beach:
     54  AUBIO_FREE(s);
     55  return NULL;
    4956}
    5057
Note: See TracChangeset for help on using the changeset viewer.