From: Paul Brossier Date: Fri, 25 Sep 2009 02:23:21 +0000 (+0200) Subject: tests/src/test-window.c: update to new_aubio_window X-Git-Tag: bzr2git~315 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff9d00c3fd1b335633d54c83556e44652441455c;p=aubio.git tests/src/test-window.c: update to new_aubio_window --- diff --git a/tests/src/test-window.c b/tests/src/test-window.c index 19f8f781..51f1c1c6 100644 --- a/tests/src/test-window.c +++ b/tests/src/test-window.c @@ -1,35 +1,36 @@ #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("%1.3e, ", f->data[i][j]); - } - printf(";\n"); - } -} - int main( int argc, char** argv ) { uint_t length; for (length = 2; length <= 5; length++) { - fvec_t *t = new_fvec(length,9); - aubio_window(t->data[0],t->length,aubio_win_rectangle); - aubio_window(t->data[1],t->length,aubio_win_hamming); - aubio_window(t->data[2],t->length,aubio_win_hanning); - aubio_window(t->data[3],t->length,aubio_win_hanningz); - aubio_window(t->data[4],t->length,aubio_win_blackman); - aubio_window(t->data[5],t->length,aubio_win_blackman_harris); - aubio_window(t->data[6],t->length,aubio_win_gaussian); - aubio_window(t->data[7],t->length,aubio_win_welch); - aubio_window(t->data[8],t->length,aubio_win_parzen); - print_array(t); + fvec_t *t = new_aubio_window(length,aubio_win_rectangle); + del_fvec(t); + t = new_aubio_window(length,aubio_win_hamming); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_hanning); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_hanningz); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_blackman); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_blackman_harris); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_gaussian); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_welch); + fvec_print(t); + del_fvec(t); + t = new_aubio_window(length,aubio_win_parzen); + fvec_print(t); del_fvec(t); } return 0;