Intel IPP support for aubio
[aubio.git] / tests / src / pitch / test-pitchyin.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   
12   uint_t n = 10; // compute n times
13   uint_t win_s = 1024; // window size
14   // create some vectors
15   fvec_t * input_signal = new_fvec (win_s); // input signal
16   fvec_t * output_cands = new_fvec (1); // output candidates
17   // create pitch object
18   aubio_pitchyin_t *p = new_aubio_pitchyin (win_s);
19
20   while ( n-- ) {
21     aubio_pitchyin_do (p, input_signal, output_cands);
22   };
23
24   fvec_print(output_cands);
25
26   del_fvec(input_signal);
27   del_fvec(output_cands);
28   del_aubio_pitchyin(p);
29   aubio_cleanup();
30
31   return 0;
32 }