Changeset 7e8b276
- Timestamp:
- Nov 28, 2016, 4:16:26 PM (8 years ago)
- Branches:
- sampler
- Children:
- d5745af
- Parents:
- 1437b5c
- git-author:
- Paul Brossier <piem@piem.org> (10/03/16 18:59:12)
- git-committer:
- Paul Brossier <piem@piem.org> (11/28/16 16:16:26)
- Location:
- examples
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
r1437b5c r7e8b276 49 49 50 50 int main(int argc, char **argv) { 51 int ret = 0; 51 52 // change some default params 52 53 buffer_size = 512; … … 63 64 mfcc = new_aubio_mfcc(buffer_size, n_filters, n_coefs, samplerate); 64 65 mfcc_out = new_fvec(n_coefs); 66 if (pv == NULL || fftgrain == NULL || mfcc == NULL || mfcc_out == NULL) { 67 ret = 1; 68 goto beach; 69 } 65 70 66 71 examples_common_process((aubio_process_func_t)process_block, process_print); … … 71 76 del_fvec(mfcc_out); 72 77 78 beach: 73 79 examples_common_del(); 74 return 0;80 return ret; 75 81 } 76 -
examples/aubionotes.c
r1437b5c r7e8b276 51 51 52 52 int main(int argc, char **argv) { 53 int ret = 0; 54 53 55 examples_common_init(argc,argv); 54 56 … … 66 68 67 69 notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate); 70 if (notes == NULL) { ret = 1; goto beach; } 68 71 69 72 examples_common_process((aubio_process_func_t)process_block, process_print); … … 74 77 del_aubio_notes (notes); 75 78 79 beach: 76 80 examples_common_del(); 77 return 0;81 return ret; 78 82 } 79 -
examples/aubioonset.c
r1437b5c r7e8b276 59 59 60 60 int main(int argc, char **argv) { 61 int ret = 0; 61 62 examples_common_init(argc,argv); 62 63 … … 69 70 70 71 o = new_aubio_onset (onset_method, buffer_size, hop_size, samplerate); 72 if (o == NULL) { ret = 1; goto beach; } 71 73 if (onset_threshold != 0.) 72 74 aubio_onset_set_threshold (o, onset_threshold); … … 89 91 del_fvec (onset); 90 92 93 beach: 91 94 examples_common_del(); 92 return 0;95 return ret; 93 96 } -
examples/aubiopitch.c
r1437b5c r7e8b276 53 53 54 54 int main(int argc, char **argv) { 55 int ret = 0; 55 56 56 57 buffer_size = 2048; … … 66 67 67 68 o = new_aubio_pitch (pitch_method, buffer_size, hop_size, samplerate); 69 if (o == NULL) { ret = 1; goto beach; } 68 70 if (pitch_tolerance != 0.) 69 71 aubio_pitch_set_tolerance (o, pitch_tolerance); … … 84 86 del_fvec (pitch); 85 87 88 beach: 86 89 examples_common_del(); 87 return 0;90 return ret; 88 91 } 89 -
examples/aubiotrack.c
r1437b5c r7e8b276 61 61 62 62 int main(int argc, char **argv) { 63 int ret = 0; 63 64 // override general settings from utils.c 64 65 buffer_size = 1024; … … 76 77 tempo_out = new_fvec(2); 77 78 tempo = new_aubio_tempo(tempo_method, buffer_size, hop_size, samplerate); 79 if (tempo == NULL) { ret = 1; goto beach; } 78 80 // set silence threshold very low to output beats even during silence 79 81 // aubio_tempo_set_silence(tempo, -1000.); … … 93 95 del_fvec(tempo_out); 94 96 97 beach: 95 98 examples_common_del(); 96 return 0;99 return ret; 97 100 } 98
Note: See TracChangeset
for help on using the changeset viewer.