Changeset ff87a67


Ignore:
Timestamp:
Dec 7, 2018, 6:03:45 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
Children:
6e157df
Parents:
b2f41be
Message:

[tests] increase timestretch coverage, fix memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/effects/test-timestretch.c

    rb2f41be rff87a67  
    4444  fvec_t *in = new_fvec(source_hopsize);
    4545  fvec_t *out = new_fvec(hop_size);
    46   if (!out) { err = 1; goto beach_fvec; }
     46  if (!out || !in) { err = 1; goto beach_fvec; }
    4747
    4848  aubio_timestretch_t *ps = new_aubio_timestretch(mode, stretch, hop_size,
     
    9191beach_timestretch:
    9292  del_fvec(out);
     93  del_fvec(in);
    9394beach_fvec:
    9495  del_aubio_source(s);
     
    108109  uint_t samplerate = 44100;
    109110
    110   if (new_aubio_timestretch("??", stretch, hop_size, samplerate)) return 1;
     111  if (new_aubio_timestretch("ProcessOffline:?:", stretch, hop_size, samplerate)) return 1;
     112  if (new_aubio_timestretch("", stretch, hop_size, samplerate)) return 1;
    111113  if (new_aubio_timestretch(mode,     41., hop_size, samplerate)) return 1;
    112114  if (new_aubio_timestretch(mode, stretch,        0, samplerate)) return 1;
     
    119121
    120122  if (aubio_timestretch_get_latency(p) == 0) return 1;
     123
     124  if (aubio_timestretch_get_samplerate(p) != samplerate) return 1;
    121125
    122126  aubio_timestretch_reset(p);
Note: See TracChangeset for help on using the changeset viewer.