a6267e9a6529eb3f537993d4fd0c424610bea761
[aubio.git] / tests / src / pitch / test-pitchschmitt.c
1 #define AUBIO_UNSTABLE 1
2
3 // this file uses the unstable aubio api, please use aubio_pitch instead
4 // see src/pitch/pitch.h and tests/src/pitch/test-pitch.c
5
6 #include <aubio.h>
7
8 int main (void)
9 {
10   aubio_init();
11   uint_t n = 10; // compute n times
12   uint_t win_s = 1024; // window size
13   // create some vectors
14   fvec_t * in = new_fvec (win_s); // input buffer
15   fvec_t * out = new_fvec (1); // input buffer
16   // create pitch object
17   aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s);
18
19   while ( n-- ) {
20     aubio_pitchschmitt_do (o,in, out);
21   };
22
23   del_aubio_pitchschmitt(o);
24   del_fvec(in);
25   del_fvec(out);
26   aubio_cleanup();
27
28   return 0;
29 }
30