- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/src/pitch/test-pitchfcomb.c ¶
rc71aa44 r9d6001cb 1 1 #define AUBIO_UNSTABLE 1 2 3 // this file uses the unstable aubio api, please use aubio_pitch instead4 // see src/pitch/pitch.h and tests/src/pitch/test-pitch.c5 2 6 3 #include <aubio.h> 7 4 8 int main () 9 { 10 uint_t i = 0; 11 uint_t win_s = 1024; // window size 12 uint_t hop_s = win_s/4; // hop size 13 // create some vectors 14 fvec_t * in = new_fvec (hop_s); // input buffer 15 fvec_t * out = new_fvec (1); // output candidates 16 // create pitch object 17 aubio_pitchfcomb_t * o = new_aubio_pitchfcomb ( win_s, hop_s); 5 int main(){ 6 /* allocate some memory */ 7 uint_t win_s = 1024; /* window size */ 8 uint_t hop_s = win_s/4; /* hop size */ 9 fvec_t * in = new_fvec (hop_s); /* input buffer */ 10 fvec_t * out = new_fvec (1); 11 aubio_pitchfcomb_t * o = new_aubio_pitchfcomb ( 12 win_s, hop_s); 13 uint_t i = 0; 18 14 19 while (i < 10) {20 aubio_pitchfcomb_do (o,in, out);21 i++;22 };15 while (i < 2) { 16 aubio_pitchfcomb_do (o,in, out); 17 i++; 18 }; 23 19 24 del_aubio_pitchfcomb(o); 25 del_fvec(out); 26 del_fvec(in); 27 aubio_cleanup(); 28 return 0; 20 del_aubio_pitchfcomb(o); 21 del_fvec(out); 22 del_fvec(in); 23 aubio_cleanup(); 24 25 return 0; 29 26 }
Note: See TracChangeset
for help on using the changeset viewer.