Changeset b0d4c78 for tests/src/io


Ignore:
Timestamp:
Nov 29, 2018, 4:12:31 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:
1b3edc6
Parents:
da67922
Message:

[tests] fix argument parsing in source tests

Location:
tests/src/io
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/src/io/test-source_apple_audio.c

    rda67922 rb0d4c78  
    2828  uint_t hop_size = 256;
    2929  uint_t n_frames = 0, read = 0;
    30   if ( argc == 3 ) samplerate = atoi(argv[2]);
    31   if ( argc == 4 ) hop_size = atoi(argv[3]);
     30  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     31  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    3232
    3333  char_t *source_path = argv[1];
  • tests/src/io/test-source_avcodec.c

    rda67922 rb0d4c78  
    2828  uint_t hop_size = 256;
    2929  uint_t n_frames = 0, read = 0;
    30   if ( argc == 3 ) samplerate = atoi(argv[2]);
    31   if ( argc == 4 ) hop_size = atoi(argv[3]);
     30  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     31  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    3232
    3333  char_t *source_path = argv[1];
  • tests/src/io/test-source_seek.c

    rda67922 rb0d4c78  
    2424  uint_t n_frames = 0, read = 0;
    2525  uint_t old_n_frames_1 = 0, old_n_frames_2 = 0, old_n_frames_3 = 0;
    26   if ( argc == 3 ) samplerate = atoi(argv[2]);
    27   if ( argc == 4 ) hop_size = atoi(argv[3]);
     26  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     27  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    2828
    2929  char_t *source_path = argv[1];
  • tests/src/io/test-source_sndfile.c

    rda67922 rb0d4c78  
    2828  uint_t hop_size = 256;
    2929  uint_t n_frames = 0, read = 0;
    30   if ( argc == 3 ) samplerate = atoi(argv[2]);
    31   if ( argc == 4 ) hop_size = atoi(argv[3]);
     30  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     31  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    3232
    3333  char_t *source_path = argv[1];
  • tests/src/io/test-source_wavread.c

    rda67922 rb0d4c78  
    2828  uint_t hop_size = 256;
    2929  uint_t n_frames = 0, read = 0;
    30   if ( argc == 3 ) samplerate = atoi(argv[2]);
    31   if ( argc == 4 ) hop_size = atoi(argv[3]);
     30  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     31  if ( argc >= 4 ) hop_size = atoi(argv[3]);
    3232
    3333  char_t *source_path = argv[1];
Note: See TracChangeset for help on using the changeset viewer.