feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since ab7d100 was
301b807,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
tests/src/io/*.c: add simple tests
|
-
Property mode set to
100644
|
File size:
656 bytes
|
Line | |
---|
1 | #include <stdio.h> |
---|
2 | #include <aubio.h> |
---|
3 | |
---|
4 | char_t *path = "/Users/piem/archives/sounds/loops/drum_Chocolate_Milk_-_Ation_Speaks_Louder_Than_Words.wav"; |
---|
5 | //char_t *path = "/Users/piem/Downloads/Keziah Jones - Where's Life.mp3"; |
---|
6 | |
---|
7 | int main(){ |
---|
8 | uint_t samplerate = 32000; |
---|
9 | uint_t hop_size = 1024; |
---|
10 | uint_t read = hop_size; |
---|
11 | fvec_t *vec = new_fvec(hop_size); |
---|
12 | aubio_source_t* s = new_aubio_source(path, samplerate, hop_size); |
---|
13 | |
---|
14 | if (!s) return -1; |
---|
15 | |
---|
16 | while ( read == hop_size ) { |
---|
17 | aubio_source_do(s, vec, &read); |
---|
18 | fprintf(stdout, "%d [%f, %f, ..., %f]\n", read, vec->data[0], vec->data[1], vec->data[read - 1]); |
---|
19 | } |
---|
20 | |
---|
21 | del_aubio_source(s); |
---|
22 | |
---|
23 | return 0; |
---|
24 | } |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.