tests/: undo changes, removing calls to aubio_init
[aubio.git] / tests / src / pitch / test-pitchfcomb.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   uint_t i = 0;
11   uint_t win_s = 1024; // window size
12   uint_t hop_s = win_s/4; // hop size
13   // create some vectors
14   fvec_t * in = new_fvec (hop_s); // input buffer
15   fvec_t * out = new_fvec (1); // output candidates
16   // create pitch object
17   aubio_pitchfcomb_t * o  = new_aubio_pitchfcomb ( win_s, hop_s);
18
19   while (i < 10) {
20     aubio_pitchfcomb_do (o,in, out);
21     i++;
22   };
23
24   del_aubio_pitchfcomb(o);
25   del_fvec(out);
26   del_fvec(in);
27   aubio_cleanup();
28   return 0;
29 }