Changeset 97a5ac08 for src


Ignore:
Timestamp:
Dec 7, 2018, 12:18:17 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
Children:
b2f41be
Parents:
9d8cedf5
Message:

[timestretch] validate input hopsize and samplerate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/effects/timestretch_rubberband.c

    r9d8cedf5 r97a5ac08  
    6565  p->hopsize = hopsize;
    6666  p->pitchscale = 1.;
     67
     68  if ((sint_t)hopsize <= 0) {
     69    AUBIO_ERR("timestretch: hopsize should be > 0, got %d\n", hopsize);
     70    goto beach;
     71  }
     72
     73  if ((sint_t)samplerate <= 0) {
     74    AUBIO_ERR("timestretch: samplerate should be > 0, got %d\n", samplerate);
     75    goto beach;
     76  }
    6777
    6878  if (stretchratio <= MAX_STRETCH_RATIO && stretchratio >= MIN_STRETCH_RATIO) {
Note: See TracChangeset for help on using the changeset viewer.