Changeset b4e1438 for tests/src


Ignore:
Timestamp:
Apr 25, 2016, 4:45:22 PM (9 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, pitchshift, sampler, timestretch, yinfft+
Children:
691791e
Parents:
c6e7ba1
Message:

src/io/source_wavread.h: add _get_duration

File:
1 edited

Legend:

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

    rc6e7ba1 rb4e1438  
    3636  aubio_source_wavread_t * s =
    3737    new_aubio_source_wavread(source_path, samplerate, hop_size);
     38
    3839  if (!s) { err = 1; goto beach; }
    3940  fvec_t *vec = new_fvec(hop_size);
     41
     42  uint_t n_frames_expected = aubio_source_wavread_get_duration(s);
    4043
    4144  samplerate = aubio_source_wavread_get_samplerate(s);
     
    4750  } while ( read == hop_size );
    4851
    49   PRINT_MSG("read %d frames at %dHz (%d blocks) from %s\n", n_frames, samplerate,
    50     n_frames / hop_size, source_path);
     52  PRINT_MSG("read %d frames (expected %d) at %dHz (%d blocks) from %s\n",
     53            n_frames, n_frames_expected, samplerate, n_frames / hop_size,
     54            source_path);
    5155
    5256  del_fvec (vec);
Note: See TracChangeset for help on using the changeset viewer.