feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since e1cdb89 was
7e35b37,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
tests/src/: improve examples
|
-
Property mode set to
100644
|
File size:
752 bytes
|
Line | |
---|
1 | #include <aubio.h> |
---|
2 | #include <math.h> |
---|
3 | #include <stdio.h> |
---|
4 | |
---|
5 | int main () |
---|
6 | { |
---|
7 | uint_t length = 0; |
---|
8 | uint_t n_length = 4, n_types = 10, i, t; |
---|
9 | uint_t lengths[4] = { 8, 10, 15, 16 }; |
---|
10 | char *method = "default"; |
---|
11 | char *window_types[10] = { "default", |
---|
12 | "rectangle", "hamming", "hanning", "hanningz", |
---|
13 | "blackman", "blackman_harris", "gaussian", "welch", "parzen"}; |
---|
14 | |
---|
15 | for ( t = 0; t < n_types; t ++ ) { |
---|
16 | for ( i = 0; i < n_length; i++) |
---|
17 | { |
---|
18 | length = lengths[i]; |
---|
19 | method = window_types[t]; |
---|
20 | |
---|
21 | fvec_t * window = new_aubio_window(method, length); |
---|
22 | |
---|
23 | fvec_set_window(window, method); |
---|
24 | fprintf(stdout, "length: %d, method: %s, window:, ", length, method); |
---|
25 | fvec_print(window); |
---|
26 | |
---|
27 | del_fvec(window); |
---|
28 | } |
---|
29 | } |
---|
30 | return 0; |
---|
31 | } |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.