feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since 986131d was
986131d,
checked in by Eduard Müller <mueller.eduard@googlemail.com>, 7 years ago
|
Intel IPP support for aubio
See emuell/aubio/ intel_ipp2 for details please
|
-
Property mode set to
100644
|
File size:
847 bytes
|
Line | |
---|
1 | #include <aubio.h> |
---|
2 | |
---|
3 | int main (void) |
---|
4 | { |
---|
5 | aubio_init(); |
---|
6 | |
---|
7 | uint_t win_s = 64; // window size |
---|
8 | |
---|
9 | // create biquad filter with `b0`, `b1`, `b2`, `a1`, `a2` |
---|
10 | aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3); |
---|
11 | |
---|
12 | fvec_t * in_vec = new_fvec (win_s); // input buffer |
---|
13 | fvec_t * tmp_vec = new_fvec (win_s); // temporary buffer |
---|
14 | fvec_t * out_vec = new_fvec (win_s); // output buffer |
---|
15 | |
---|
16 | uint_t times = 100; |
---|
17 | while ( times-- ) { |
---|
18 | // copy to out, then filter out |
---|
19 | aubio_filter_do_outplace(o, in_vec, out_vec); |
---|
20 | // in-place filtering |
---|
21 | aubio_filter_do(o, in_vec); |
---|
22 | // in-place filtering |
---|
23 | aubio_filter_do_filtfilt(o, in_vec, out_vec); |
---|
24 | fvec_print(in_vec); |
---|
25 | } |
---|
26 | |
---|
27 | // memory clean-up, one for each new |
---|
28 | del_aubio_filter(o); |
---|
29 | del_fvec(in_vec); |
---|
30 | del_fvec(tmp_vec); |
---|
31 | del_fvec(out_vec); |
---|
32 | |
---|
33 | aubio_cleanup(); |
---|
34 | |
---|
35 | return 0; |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.