- Timestamp:
- Dec 23, 2018, 12:11:17 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- b40c149
- Parents:
- b03f1bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_wavread.c
rb03f1bf r0a1ad90 27 27 #include "ioutils.h" 28 28 #include "source_wavread.h" 29 30 #include <errno.h>31 29 32 30 #define AUBIO_WAVREAD_BUFSIZE 1024 … … 101 99 s->fid = fopen((const char *)path, "rb"); 102 100 if (!s->fid) { 103 AUBIO_ ERR("source_wavread: Failed opening %s (System error: %s)\n", s->path, strerror(errno));101 AUBIO_STRERR("source_wavread: Failed opening %s (%s)\n", s->path, errorstr); 104 102 goto beach; 105 103 } … … 134 132 bytes_junk += read_little_endian(buf, 4); 135 133 if (fseek(s->fid, bytes_read + bytes_junk, SEEK_SET) != 0) { 136 AUBIO_ ERR("source_wavread: Failed opening %s (could not seek past JUNK Chunk: %s)\n",137 s->path, strerror(errno));134 AUBIO_STRERR("source_wavread: Failed opening %s (could not seek past JUNK Chunk: %s)\n", 135 s->path, errorstr); 138 136 goto beach; 139 137 } … … 262 260 bytes_junk += read_little_endian(buf, 4); 263 261 if (fseek(s->fid, bytes_read + bytes_junk, SEEK_SET) != 0) { 264 AUBIO_ ERR("source_wavread: could not seek past unknown chunk in %s (%s)\n",265 s->path, strerror(errno));262 AUBIO_STRERR("source_wavread: could not seek past unknown chunk in %s (%s)\n", 263 s->path, errorstr); 266 264 goto beach; 267 265 } … … 443 441 ret = fseek(s->fid, s->seek_start + pos * s->blockalign, SEEK_SET); 444 442 if (ret != 0) { 445 AUBIO_ ERR("source_wavread: could not seek %s at %d (%s)\n", s->path, pos, strerror(errno));443 AUBIO_STRERR("source_wavread: could not seek %s at %d (%s)\n", s->path, pos, errorstr); 446 444 return AUBIO_FAIL; 447 445 } … … 464 462 } 465 463 if (fclose(s->fid)) { 466 AUBIO_ ERR("source_wavread: could not close %s (%s)\n", s->path, strerror(errno));464 AUBIO_STRERR("source_wavread: could not close %s (%s)\n", s->path, errorstr); 467 465 return AUBIO_FAIL; 468 466 }
Note: See TracChangeset
for help on using the changeset viewer.