summaryrefslogtreecommitdiff
path: root/tests/src/pitch/test-pitchspecacf.c
blob: 5a4fa2385eafacfa1ac197487cbbf2ea8afa8fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 <aubio.h>

int main (void)
{
  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;
}