feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since 2bf59042 was
9338e18,
checked in by Paul Brossier <piem@piem.org>, 7 years ago
|
tests/src/spectral/test-dct.c: remove old comment
|
-
Property mode set to
100644
|
File size:
657 bytes
|
Rev | Line | |
---|
[60583a3] | 1 | #include <aubio.h> |
---|
| 2 | |
---|
| 3 | int main (void) |
---|
| 4 | { |
---|
| 5 | int return_code = 0; |
---|
| 6 | uint_t win_s = 32; // window size |
---|
| 7 | uint_t i, n_iters = 10; // number of iterations |
---|
| 8 | // create dct object |
---|
| 9 | aubio_dct_t * dct = new_aubio_dct(win_s); |
---|
| 10 | |
---|
| 11 | fvec_t * in = new_fvec (win_s); // input buffer |
---|
| 12 | fvec_t * dctout = new_fvec (win_s); // output buffer |
---|
| 13 | |
---|
| 14 | if (!dct || !in || !dctout) { |
---|
| 15 | return_code = 1; |
---|
| 16 | return return_code; |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | in->data[0] = 1.; |
---|
| 20 | for (i = 0; i < n_iters; i++) { |
---|
| 21 | aubio_dct_do (dct, in, dctout); |
---|
| 22 | aubio_dct_rdo (dct, dctout, in); |
---|
| 23 | } |
---|
| 24 | fvec_print(dctout); |
---|
| 25 | fvec_print(in); |
---|
| 26 | del_fvec(dctout); |
---|
| 27 | del_fvec(in); |
---|
| 28 | |
---|
| 29 | del_aubio_dct(dct); |
---|
| 30 | return return_code; |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.