Changeset c71aa44 for tests/src/pitch/test-pitchschmitt.c
- Timestamp:
- Mar 3, 2013, 5:47:05 PM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 248da64
- Parents:
- e230bb4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/src/pitch/test-pitchschmitt.c ΒΆ
re230bb4 rc71aa44 1 1 #define AUBIO_UNSTABLE 1 2 3 // this file uses the unstable aubio api, please use aubio_pitch instead 4 // see src/pitch/pitch.h and tests/src/pitch/test-pitch.c 2 5 3 6 #include <aubio.h> 4 7 5 int main(){ 6 /* allocate some memory */ 7 uint_t win_s = 1024; /* window size */ 8 fvec_t * in = new_fvec (win_s); /* input buffer */ 9 fvec_t * out = new_fvec (1); /* input buffer */ 10 aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s); 11 uint_t i = 0; 8 int main () 9 { 10 uint_t n = 10; // compute n times 11 uint_t win_s = 1024; // window size 12 // create some vectors 13 fvec_t * in = new_fvec (win_s); // input buffer 14 fvec_t * out = new_fvec (1); // input buffer 15 // create pitch object 16 aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s); 12 17 13 while (i < 1000) { 14 aubio_pitchschmitt_do (o,in, out); 15 i++; 16 }; 18 while ( n-- ) { 19 aubio_pitchschmitt_do (o,in, out); 20 }; 17 21 18 19 20 21 22 del_aubio_pitchschmitt(o); 23 del_fvec(in); 24 del_fvec(out); 25 aubio_cleanup(); 22 26 23 27 return 0; 24 28 } 25 29
Note: See TracChangeset
for help on using the changeset viewer.