Changeset 77db425 for tests


Ignore:
Timestamp:
Nov 26, 2013, 4:18:57 AM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
2dbcafa
Parents:
18f14f9
Message:

src/tempo/tempo.c: fix for different samplerates

Location:
tests/src/tempo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/tempo/test-beattracking.c

    r18f14f9 r77db425  
    1212
    1313  // create beattracking object
    14   aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s);
     14  aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s, 256, 44100);
    1515
    1616  smpl_t bpm, confidence;
  • tests/src/tempo/test-tempo.c

    r18f14f9 r77db425  
    99    PRINT_ERR("not enough arguments\n");
    1010    PRINT_MSG("read a wave file as a mono vector\n");
    11     PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
     11    PRINT_MSG("usage: %s <source_path> [samplerate] [win_size] [hop_size]\n", argv[0]);
    1212    return err;
    1313  }
    1414  uint_t samplerate = 0;
    15   uint_t win_s = 1024; // window size
    16   uint_t hop_size = win_s / 4;
     15  if ( argc >= 3 ) samplerate = atoi(argv[2]);
     16  uint_t win_size = 1024; // window size
     17  if ( argc >= 4 ) win_size = atoi(argv[3]);
     18  uint_t hop_size = win_size / 4;
     19  if ( argc >= 5 ) hop_size = atoi(argv[4]);
    1720  uint_t n_frames = 0, read = 0;
    18   if ( argc == 3 ) samplerate = atoi(argv[2]);
    19   if ( argc == 4 ) hop_size = atoi(argv[3]);
    2021
    2122  char_t *source_path = argv[1];
     
    3031
    3132  // create tempo object
    32   aubio_tempo_t * o = new_aubio_tempo("default", win_s, hop_size, samplerate);
     33  aubio_tempo_t * o = new_aubio_tempo("default", win_size, hop_size, samplerate);
    3334
    3435  do {
Note: See TracChangeset for help on using the changeset viewer.