shithub: aubio

Download patch

ref: 9daf0183f0a28b112be50bb3282a66699ee59b5d
parent: 06f2d78ae6d20238dc8c89f1b490f0862a49c450
author: Paul Brossier <piem@piem.org>
date: Thu Oct 8 08:07:12 EDT 2009

tests/src/test-resample.c: run 10 times, update defines

--- a/tests/src/test-resample.c
+++ b/tests/src/test-resample.c
@@ -1,7 +1,8 @@
+#include <stdio.h>
 #include <aubio.h>
 
 int main(){
-#if HAVE_LIBSAMPLERATE
+#if HAVE_SAMPLERATE
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
         uint_t channels   = 1;                          /* number of channel */
@@ -11,8 +12,8 @@
         aubio_resampler_t * o  = new_aubio_resampler(0.5, 0);
         uint_t i = 0;
 
-        while (i < 100) {
-          aubio_resampler_process(o,in,out);
+        while (i < 10) {
+          aubio_resampler_do(o,in,out);
           i++;
         };
 
@@ -20,6 +21,8 @@
         del_fvec(in);
         del_fvec(out);
 
-#endif /* HAVE_LIBSAMPLERATE */
+#else
+        fprintf(stderr, "aubio_resampler_t not compiled in\n");
+#endif /* HAVE_SAMPLERATE */
         return 0;
 }