source:
tests/src/temporal/test-resampler.c
@
aa15080
Last change on this file since aa15080 was 158e031, checked in by , 11 years ago | |
---|---|
|
|
File size: 437 bytes |
Rev | Line | |
---|---|---|
[4e9101e] | 1 | #include <aubio.h> |
2 | ||
[158e031] | 3 | int main (void) |
[48b6a52] | 4 | { |
[3684ab4] | 5 | uint_t win_s = 1024; // window size |
[48b6a52] | 6 | smpl_t ratio = 0.5; |
[3684ab4] | 7 | fvec_t *in = new_fvec (win_s); // input buffer |
8 | fvec_t *out = new_fvec ((uint_t) (win_s * ratio)); // output buffer | |
[48b6a52] | 9 | aubio_resampler_t *o = new_aubio_resampler (0.5, 0); |
10 | uint_t i = 0; | |
[4e9101e] | 11 | |
[48b6a52] | 12 | while (i < 10) { |
13 | aubio_resampler_do (o, in, out); | |
14 | i++; | |
15 | }; | |
[4e9101e] | 16 | |
[48b6a52] | 17 | del_aubio_resampler (o); |
18 | del_fvec (in); | |
19 | del_fvec (out); | |
[4e9101e] | 20 | |
[48b6a52] | 21 | return 0; |
[4e9101e] | 22 | } |
Note: See TracBrowser
for help on using the repository browser.