Changeset 44e94f3c


Ignore:
Timestamp:
Dec 7, 2013, 1:56:18 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:
466dff3
Parents:
1b25a70
Message:

src/synth/wavetable.c: make sure samplerate is valid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/synth/wavetable.c

    r1b25a70 r44e94f3c  
    4444{
    4545  aubio_wavetable_t *s = AUBIO_NEW(aubio_wavetable_t);
     46  if ((sint_t)samplerate <= 0) {
     47    AUBIO_ERR("Can not create wavetable with samplerate %d\n", samplerate);
     48    goto beach;
     49  }
    4650  uint_t i = 0;
    4751  s->samplerate = samplerate;
     
    6064  s->amp = new_aubio_parameter( 0., 1., 100 );
    6165  return s;
     66beach:
     67  AUBIO_FREE(s);
     68  return NULL;
    6269}
    6370
Note: See TracChangeset for help on using the changeset viewer.