shithub: aubio

Download patch

ref: 3286230f7713da2ad076b8a8e1106e0f3ab79790
parent: 987fb86c97aee37ed3a19ebeee659eec6a7e88e0
author: Paul Brossier <piem@piem.org>
date: Fri Mar 22 15:07:51 EDT 2013

tests/src/io/test-source_seek.c: add simple test, read() / seek(0) / read()

--- a/tests/src/io/test-source_seek.c
+++ b/tests/src/io/test-source_seek.c
@@ -22,6 +22,7 @@
   uint_t samplerate = 0;
   uint_t hop_size = 256;
   uint_t n_frames = 0, read = 0;
+  uint_t old_n_frames;
   if ( argc == 3 ) samplerate = atoi(argv[2]);
   if ( argc == 4 ) hop_size = atoi(argv[3]);
 
@@ -45,6 +46,8 @@
 
   aubio_source_seek (s, 0);
 
+  old_n_frames = n_frames;
+
   n_frames = 0;
   do {
     aubio_source_do(s, vec, &read);
@@ -59,5 +62,6 @@
 beach:
   del_fvec (vec);
 
+  assert ( n_frames == old_n_frames );
   return err;
 }