From 4219f8a396ec89040de092b346722b2d8e1c7308 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 7 Dec 2013 14:33:12 -0500 Subject: [PATCH] tests/src/pitch/test-pitchspecacf.c: add simple test --- tests/src/pitch/test-pitchspecacf.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/src/pitch/test-pitchspecacf.c diff --git a/tests/src/pitch/test-pitchspecacf.c b/tests/src/pitch/test-pitchspecacf.c new file mode 100644 index 00000000..de22c070 --- /dev/null +++ b/tests/src/pitch/test-pitchspecacf.c @@ -0,0 +1,29 @@ +#define AUBIO_UNSTABLE 1 + +// this file uses the unstable aubio api, please use aubio_pitch instead +// see src/pitch/pitch.h and tests/src/pitch/test-pitch.c + +#include + +int main () +{ + uint_t n = 10; // compute n times + uint_t win_s = 1024; // window size + // create some vectors + fvec_t * in = new_fvec (win_s); // input buffer + fvec_t * out = new_fvec (1); // input buffer + // create pitch object + aubio_pitchspecacf_t * o = new_aubio_pitchspecacf(win_s); + + while ( n-- ) { + aubio_pitchspecacf_do(o,in, out); + }; + + del_aubio_pitchspecacf(o); + del_fvec(in); + del_fvec(out); + aubio_cleanup(); + + return 0; +} + -- 2.11.0