Changeset 0de816c


Ignore:
Timestamp:
Nov 29, 2018, 6:36:22 PM (6 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
Children:
242e923
Parents:
9ffa590
Message:

[tests] fix argument parsing in onset and wavetable

Location:
tests/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/onset/test-onset.c

    r9ffa590 r0de816c  
    1818  uint_t hop_size = win_s / 4;
    1919  uint_t n_frames = 0, read = 0;
    20   if ( argc == 3 ) samplerate = atoi(argv[2]);
    21   if ( argc == 4 ) hop_size = atoi(argv[3]);
     20  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     21  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    2222
    2323  char_t *source_path = argv[1];
  • tests/src/synth/test-wavetable.c

    r9ffa590 r0de816c  
    1818
    1919  char_t *sink_path = argv[1];
    20   if ( argc == 4 ) samplerate = atoi(argv[3]);
    21   if ( argc == 3 ) freq = atof(argv[2]);
     20  if ( argc >= 4 ) samplerate = atoi(argv[3]);
     21  if ( argc >= 3 ) freq = atof(argv[2]);
    2222
    2323  fvec_t *vec = new_fvec(hop_size);
Note: See TracChangeset for help on using the changeset viewer.