Changeset 4621cd6 for examples/utils.c
- Timestamp:
- Dec 4, 2009, 1:46:40 AM (14 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:
- aea235c
- Parents:
- c17a0ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.c
rc17a0ee r4621cd6 61 61 uint_t buffer_size = 512; //1024; 62 62 uint_t overlap_size = 256; //512; 63 uint_t channels = 1;64 63 uint_t samplerate = 44100; 65 64 … … 208 207 parse_args (argc, argv); 209 208 210 woodblock = new_fvec ( buffer_size, 1);209 woodblock = new_fvec (overlap_size); 211 210 if (output_filename || usejack) { 212 211 /* dummy assignement to keep egcs happy */ … … 221 220 if (onsetfile) { 222 221 /* read the output sound once */ 223 aubio_sndfile_read (onsetfile, overlap_size, woodblock);222 aubio_sndfile_read_mono (onsetfile, overlap_size, woodblock); 224 223 } 225 224 … … 233 232 if (verbose) 234 233 aubio_sndfile_info (file); 235 channels = aubio_sndfile_channels (file);236 234 samplerate = aubio_sndfile_samplerate (file); 237 235 if (output_filename != NULL) … … 256 254 #endif /* HAVE_LASH */ 257 255 258 ibuf = new_fvec (overlap_size, channels); 259 obuf = new_fvec (overlap_size, channels); 256 uint_t i; 257 ibuf = new_fvec (overlap_size); 258 obuf = new_fvec (overlap_size); 260 259 261 260 } … … 265 264 examples_common_del (void) 266 265 { 266 uint_t i; 267 267 del_fvec (ibuf); 268 268 del_fvec (obuf); … … 283 283 #if HAVE_JACK 284 284 debug ("Jack init ...\n"); 285 jack_setup = new_aubio_jack ( channels, channels,285 jack_setup = new_aubio_jack (1, 1, 286 286 0, 1, (aubio_process_func_t) process_func); 287 287 debug ("Jack activation ...\n"); … … 301 301 frames = 0; 302 302 303 while ((signed) overlap_size == aubio_sndfile_read (file, overlap_size,304 305 process_func ( ibuf->data,obuf->data, overlap_size);303 while ((signed) overlap_size == 304 aubio_sndfile_read_mono (file, overlap_size, ibuf)) { 305 process_func (&ibuf->data, &obuf->data, overlap_size); 306 306 print (); 307 307 if (output_filename != NULL) { 308 aubio_sndfile_write (fileout, overlap_size, obuf);308 aubio_sndfile_write (fileout, overlap_size, &obuf); 309 309 } 310 310 frames++; … … 328 328 fvec_zeros(obuf); 329 329 for (i = 0; (signed) i < frames_delay; i++) { 330 process_func ( ibuf->data,obuf->data, overlap_size);330 process_func (&ibuf->data, &obuf->data, overlap_size); 331 331 print (); 332 332 }
Note: See TracChangeset
for help on using the changeset viewer.