From 51ee6700a557615e646eeb5da2d0bb5f0fdec8b2 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 25 Sep 2009 04:26:14 +0200 Subject: [PATCH] tests/src/test-hist.c: update to new_aubio_window --- tests/src/test-hist.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/tests/src/test-hist.c b/tests/src/test-hist.c index 297dcf04..7984ae91 100644 --- a/tests/src/test-hist.c +++ b/tests/src/test-hist.c @@ -1,35 +1,26 @@ #include #include -void print_array(fvec_t *f); -void print_array(fvec_t *f){ - uint_t i,j; - for (i=0;ichannels;i++){ - for (j=0;jlength;j++){ - printf("%f, ", f->data[i][j]); - } - printf(";\n"); - } -} - int main( int argc, char** argv ) { uint_t length; for (length = 1; length < 10; length ++ ) { - fvec_t *t = new_fvec(length,5); aubio_hist_t *o = new_aubio_hist(0, 1, length, 5); - aubio_window(t->data[0],t->length,aubio_win_hanning); - aubio_window(t->data[1],t->length,aubio_win_hanningz); - aubio_window(t->data[2],t->length,aubio_win_blackman); - aubio_window(t->data[3],t->length,aubio_win_blackman_harris); - aubio_window(t->data[4],t->length,aubio_win_hamming); - print_array(t); + fvec_t *t = new_aubio_window(length,aubio_win_hanning); + aubio_hist_do(o,t); + fvec_print(t); + aubio_hist_do_notnull(o,t); + fvec_print(t); + aubio_hist_dyn_notnull(o,t); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_hanningz); aubio_hist_do(o,t); - print_array(t); + fvec_print(t); aubio_hist_do_notnull(o,t); - print_array(t); + fvec_print(t); aubio_hist_dyn_notnull(o,t); - print_array(t); + fvec_print(t); del_aubio_hist(o); del_fvec(t); } -- 2.26.2