source: tests/src/io/test-source_apple_audio_file.c @ 4722e63

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 4722e63 was 4722e63, checked in by Paul Brossier <piem@piem.org>, 8 years ago

tests/src/io/test-source_apple_audio_file.c: do nothing if not on apple platform

  • Property mode set to 100644
File size: 824 bytes
Line 
1#include <stdio.h>
2#include <aubio.h>
3
4char_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
7int 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, "was not compiled with aubio_source_apple_audio");
25#endif /* __APPLE__ */
26  return 0;
27}
28
Note: See TracBrowser for help on using the repository browser.