feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 420962e was
afbd7e7,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
src/io/source_sndfile.{c,h}: added sndfile source
|
-
Property mode set to
100644
|
File size:
837 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 = "/Volumes/moving/moving/photos/gopro2/100GOPRO/GOPR4515.MP4"; |
---|
6 | |
---|
7 | int main(){ |
---|
8 | #ifdef __APPLE__ |
---|
9 | uint_t samplerate = 32000; |
---|
10 | uint_t hop_size = 1024; |
---|
11 | uint_t read = hop_size; |
---|
12 | fvec_t *vec = new_fvec(hop_size); |
---|
13 | aubio_source_apple_audio_t * s = new_aubio_source_apple_audio(path, samplerate, hop_size); |
---|
14 | |
---|
15 | if (!s) return -1; |
---|
16 | |
---|
17 | while ( read == hop_size ) { |
---|
18 | aubio_source_apple_audio_do(s, vec, &read); |
---|
19 | fprintf(stdout, "%d [%f, %f, ..., %f]\n", read, vec->data[0], vec->data[1], vec->data[read - 1]); |
---|
20 | } |
---|
21 | |
---|
22 | del_aubio_source_apple_audio(s); |
---|
23 | #else |
---|
24 | fprintf(stderr, "ERR: aubio was not compiled with aubio_source_apple_audio\n"); |
---|
25 | #endif /* __APPLE__ */ |
---|
26 | return 0; |
---|
27 | } |
---|
28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.