source:
tests/src/pitch/test-pitchschmitt.c
@
2719c54
Last change on this file since 2719c54 was 158e031, checked in by , 11 years ago | |
---|---|
|
|
File size: 638 bytes |
Rev | Line | |
---|---|---|
[21f0655] | 1 | #define AUBIO_UNSTABLE 1 |
2 | ||
[c71aa44] | 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 | ||
[4e9101e] | 6 | #include <aubio.h> |
7 | ||
[158e031] | 8 | int main (void) |
[c71aa44] | 9 | { |
10 | uint_t n = 10; // compute n times | |
11 | uint_t win_s = 1024; // window size | |
12 | // create some vectors | |
13 | fvec_t * in = new_fvec (win_s); // input buffer | |
14 | fvec_t * out = new_fvec (1); // input buffer | |
15 | // create pitch object | |
16 | aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s); | |
[4e9101e] | 17 | |
[c71aa44] | 18 | while ( n-- ) { |
19 | aubio_pitchschmitt_do (o,in, out); | |
20 | }; | |
[4e9101e] | 21 | |
[c71aa44] | 22 | del_aubio_pitchschmitt(o); |
23 | del_fvec(in); | |
24 | del_fvec(out); | |
25 | aubio_cleanup(); | |
[4e9101e] | 26 | |
[c71aa44] | 27 | return 0; |
[4e9101e] | 28 | } |
29 |
Note: See TracBrowser
for help on using the repository browser.