Changeset 23f1c49
- Timestamp:
- Feb 27, 2017, 1:18:45 AM (8 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, sampler
- Children:
- a6222fc
- Parents:
- e4a8882
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_wavread.c
re4a8882 r23f1c49 296 296 void aubio_source_wavread_readframe(aubio_source_wavread_t *s, uint_t *wavread_read) { 297 297 unsigned char *short_ptr = s->short_output; 298 if (s->fid == NULL) {299 fmat_zeros(s->output);300 *wavread_read = 0;301 return;302 }303 298 size_t read = fread(short_ptr, s->blockalign, AUBIO_WAVREAD_BUFSIZE, s->fid); 304 299 uint_t i, j, b, bitspersample = s->bitspersample; … … 334 329 uint_t end = 0; 335 330 uint_t total_wrote = 0; 331 if (s->fid == NULL) { 332 AUBIO_ERR("source_wavread: could not read from %s (file not opened)\n", 333 s->path); 334 return; 335 } 336 336 while (total_wrote < s->hop_size) { 337 337 end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote); … … 368 368 uint_t end = 0; 369 369 uint_t total_wrote = 0; 370 if (s->fid == NULL) { 371 AUBIO_ERR("source_wavread: could not read from %s (file not opened)\n", 372 s->path); 373 return; 374 } 370 375 while (total_wrote < s->hop_size) { 371 376 end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote);
Note: See TracChangeset
for help on using the changeset viewer.