Changeset 8ba8bbe


Ignore:
Timestamp:
Sep 21, 2016, 3:47:48 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
Children:
e2645cb
Parents:
6e8aa74 (diff), fa5d8ad (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.
Message:

Merge branch 'master' into pitchshift

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .appveyor.yml

    r6e8aa74 r8ba8bbe  
    6161  - "pip install ."
    6262  - "python python\\demos\\demo_create_test_sounds.py"
    63   - "nose2"
     63  - "nose2 --verbose"
    6464  # clean up
    6565  - waf distclean
  • src/io/source_sndfile.c

    r6e8aa74 r8ba8bbe  
    9999  if (s->handle == NULL) {
    100100    /* show libsndfile err msg */
    101     AUBIO_ERR("source_sndfile: Failed opening %s: %s\n", s->path, sf_strerror (NULL));
     101    AUBIO_ERR("source_sndfile: Failed opening %s (%s)\n", s->path,
     102        sf_strerror (NULL));
    102103    goto beach;
    103104  }
  • src/io/source_wavread.c

    r6e8aa74 r8ba8bbe  
    136136    }
    137137    bytes_read += bytes_junk;
    138     bytes_expected += bytes_junk;
     138    bytes_expected += bytes_junk + 4;
    139139    // now really read the fmt chunk
    140     fread(buf, 1, 4, s->fid);
     140    bytes_read += fread(buf, 1, 4, s->fid);
    141141    buf[4] = '\0';
    142142  }
     
    230230  bytes_read += fread(buf, 1, 4, s->fid);
    231231  buf[4] = '\0';
    232   if ( strcmp((const char *)buf, "data") != 0 ) {
    233     AUBIO_ERR("source_wavread: data RIFF header not found in %s\n", s->path);
    234     goto beach;
     232  while ( strcmp((const char *)buf, "data") != 0 ) {
     233    if (feof(s->fid) || ferror(s->fid)) {
     234      AUBIO_ERR("source_wavread: no data RIFF header found in %s\n", s->path);
     235      goto beach;
     236    }
     237    bytes_junk = fread(buf, 1, 4, s->fid);
     238    buf[4] = '\0';
     239    bytes_junk += read_little_endian(buf, 4);
     240    if (fseek(s->fid, bytes_read + bytes_junk, SEEK_SET) != 0) {
     241      AUBIO_ERR("source_wavread: could not seek past unknown chunk in %s (%s)\n",
     242          s->path, strerror(errno));
     243      goto beach;
     244    }
     245    bytes_read += bytes_junk;
     246    bytes_expected += bytes_junk+ 4;
     247    bytes_read += fread(buf, 1, 4, s->fid);
     248    buf[4] = '\0';
    235249  }
    236250
Note: See TracChangeset for help on using the changeset viewer.