shithub: aubio

Download patch

ref: b1d2be840ce684fd4639267ad966e75ea65445e7
parent: a41b1ef7244c43a11ede91e4ffccce358c94e580
author: Paul Brossier <piem@piem.org>
date: Mon Apr 25 12:31:25 EDT 2016

tests/src/io/test-source_apple_audio.c: add _get_duration

--- a/tests/src/io/test-source_apple_audio.c
+++ b/tests/src/io/test-source_apple_audio.c
@@ -38,6 +38,8 @@
   if (!s) { err = 1; goto beach; }
   fvec_t *vec = new_fvec(hop_size);
 
+  uint_t n_frames_expected = aubio_source_apple_audio_get_duration(s);
+
   samplerate = aubio_source_apple_audio_get_samplerate(s);
 
   do {
@@ -46,8 +48,8 @@
     n_frames += read;
   } while ( read == hop_size );
 
-  PRINT_MSG("read %d frames at %dHz (%d blocks) from %s\n", n_frames, samplerate,
-    n_frames / hop_size, source_path);
+  PRINT_MSG("read %d frames (expected %d) at %dHz (%d blocks) from %s\n",
+            n_frames, n_frames_expected, samplerate, n_frames / hop_size, source_path);
 
   del_fvec (vec);
   del_aubio_source_apple_audio (s);