feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 7a46bf6 was
4e9101e,
checked in by Paul Brossier <piem@altern.org>, 18 years ago
|
add tests for most function
add tests for most function
|
-
Property mode set to
100644
|
File size:
977 bytes
|
Rev | Line | |
---|
[4e9101e] | 1 | #include <aubio.h> |
---|
| 2 | #include <stdlib.h> |
---|
| 3 | |
---|
| 4 | void print_array(fvec_t *f); |
---|
| 5 | void print_array(fvec_t *f){ |
---|
| 6 | uint i,j; |
---|
| 7 | for (i=0;i<f->channels;i++) |
---|
| 8 | { |
---|
| 9 | for (j=0;j<f->length;j++) |
---|
| 10 | { |
---|
| 11 | printf("%1.3e, ", f->data[i][j]); |
---|
| 12 | } |
---|
| 13 | printf(";\n"); |
---|
| 14 | } |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | int main( int argc, char** argv ) |
---|
| 18 | { |
---|
| 19 | uint_t length; |
---|
| 20 | for (length = 2; length <= 5; length++) |
---|
| 21 | { |
---|
| 22 | fvec_t *t = new_fvec(length,9); |
---|
| 23 | aubio_window(t->data[0],t->length,aubio_win_rectangle); |
---|
| 24 | aubio_window(t->data[1],t->length,aubio_win_hamming); |
---|
| 25 | aubio_window(t->data[2],t->length,aubio_win_hanning); |
---|
| 26 | aubio_window(t->data[3],t->length,aubio_win_hanningz); |
---|
| 27 | aubio_window(t->data[4],t->length,aubio_win_blackman); |
---|
| 28 | aubio_window(t->data[5],t->length,aubio_win_blackman_harris); |
---|
| 29 | aubio_window(t->data[6],t->length,aubio_win_gaussian); |
---|
| 30 | aubio_window(t->data[7],t->length,aubio_win_welch); |
---|
| 31 | aubio_window(t->data[8],t->length,aubio_win_parzen); |
---|
| 32 | print_array(t); |
---|
| 33 | del_fvec(t); |
---|
| 34 | } |
---|
| 35 | return 0; |
---|
| 36 | } |
---|
| 37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.