- Timestamp:
- Nov 13, 2007, 9:15:35 AM (17 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:
- ec0d43c
- Parents:
- 941801f
- Location:
- examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubioonset.c
r941801f re24378a 72 72 if (isonset && output_filename == NULL) { 73 73 if(frames >= 4) { 74 outmsg("%f\n",(frames- 4)*overlap_size/(float)samplerate);75 } else if (frames < 4) {74 outmsg("%f\n",(frames-frames_delay)*overlap_size/(float)samplerate); 75 } else if (frames < frames_delay) { 76 76 outmsg("%f\n",0.); 77 77 } … … 80 80 81 81 int main(int argc, char **argv) { 82 frames_delay = 4; 82 83 examples_common_init(argc,argv); 83 84 examples_common_process(aubio_process,process_print); -
examples/utils.c
r941801f re24378a 22 22 void save_data (void); 23 23 void restore_data(lash_config_t * lash_config); 24 void flush_process(aubio_process_func_t process_func, aubio_print_func_t print); 24 25 pthread_t lash_thread; 25 26 #endif /* LASH_SUPPORT */ … … 33 34 int usejack = 0; 34 35 int usedoubled = 1; 36 int frames_delay = 0; 35 37 36 38 … … 395 397 396 398 debug("Processed %d frames of %d samples.\n", frames, buffer_size); 399 400 flush_process(process_func, print); 397 401 del_aubio_sndfile(file); 398 402 … … 403 407 } 404 408 409 void flush_process(aubio_process_func_t process_func, aubio_print_func_t print){ 410 uint i,j; 411 for (i = 0; i < channels; i++) { 412 for (j = 0; j < obuf->length; j++) { 413 fvec_write_sample(obuf,0.,i,j); 414 } 415 } 416 for (i = 0; i < frames_delay; i++) { 417 process_func(ibuf->data, obuf->data, overlap_size); 418 print(); 419 } 420 } 405 421 406 422 -
examples/utils.h
r941801f re24378a 42 42 extern int usejack; 43 43 extern int usedoubled; 44 extern int frames_delay; 44 45 extern unsigned int median; 45 46 extern const char * output_filename;
Note: See TracChangeset
for help on using the changeset viewer.