feature/cnnfeature/crepefeature/pitchshiftfeature/timestretchfix/ffmpeg5
Last change
on this file since 687835d was
158e031,
checked in by Paul Brossier <piem@piem.org>, 11 years ago
|
tests/: add void to prototypes to build with -Wstrict-prototypes
|
-
Property mode set to
100644
|
File size:
808 bytes
|
Line | |
---|
1 | #include <aubio.h> |
---|
2 | |
---|
3 | int main (void) |
---|
4 | { |
---|
5 | uint_t win_s = 64; // window size |
---|
6 | |
---|
7 | // create biquad filter with `b0`, `b1`, `b2`, `a1`, `a2` |
---|
8 | aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3); |
---|
9 | |
---|
10 | fvec_t * in_vec = new_fvec (win_s); // input buffer |
---|
11 | fvec_t * tmp_vec = new_fvec (win_s); // temporary buffer |
---|
12 | fvec_t * out_vec = new_fvec (win_s); // output buffer |
---|
13 | |
---|
14 | uint_t times = 100; |
---|
15 | while ( times-- ) { |
---|
16 | // copy to out, then filter out |
---|
17 | aubio_filter_do_outplace(o, in_vec, out_vec); |
---|
18 | // in-place filtering |
---|
19 | aubio_filter_do(o, in_vec); |
---|
20 | // in-place filtering |
---|
21 | aubio_filter_do_filtfilt(o, in_vec, out_vec); |
---|
22 | fvec_print(in_vec); |
---|
23 | } |
---|
24 | |
---|
25 | // memory clean-up, one for each new |
---|
26 | del_aubio_filter(o); |
---|
27 | del_fvec(in_vec); |
---|
28 | del_fvec(tmp_vec); |
---|
29 | del_fvec(out_vec); |
---|
30 | |
---|
31 | return 0; |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.