Changeset 23f1c49 for src


Ignore:
Timestamp:
Feb 27, 2017, 1:18:45 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

src/io/source_wavread.c: raise error in _do/_do_multi, not _readframe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    re4a8882 r23f1c49  
    296296void aubio_source_wavread_readframe(aubio_source_wavread_t *s, uint_t *wavread_read) {
    297297  unsigned char *short_ptr = s->short_output;
    298   if (s->fid == NULL) {
    299     fmat_zeros(s->output);
    300     *wavread_read = 0;
    301     return;
    302   }
    303298  size_t read = fread(short_ptr, s->blockalign, AUBIO_WAVREAD_BUFSIZE, s->fid);
    304299  uint_t i, j, b, bitspersample = s->bitspersample;
     
    334329  uint_t end = 0;
    335330  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  }
    336336  while (total_wrote < s->hop_size) {
    337337    end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote);
     
    368368  uint_t end = 0;
    369369  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  }
    370375  while (total_wrote < s->hop_size) {
    371376    end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote);
Note: See TracChangeset for help on using the changeset viewer.