- Timestamp:
- Nov 21, 2007, 4:53:13 PM (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:
- 66a1b955
- Parents:
- b050e8e (diff), 15b97d9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubioonset.c
rb050e8e r70585a5 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
rb050e8e r70585a5 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; (signed)i < frames_delay; i++) { 417 process_func(ibuf->data, obuf->data, overlap_size); 418 print(); 419 } 420 } 405 421 406 422 -
examples/utils.h
rb050e8e r70585a5 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.