Changeset 1dfe409 for src/io/source_wavread.c
- Timestamp:
- Mar 31, 2019, 11:12:40 PM (5 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 76b6dd3
- Parents:
- 08246ee (diff), f55630c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_wavread.c
r08246ee r1dfe409 28 28 #include "source_wavread.h" 29 29 30 #include <errno.h>31 32 30 #define AUBIO_WAVREAD_BUFSIZE 1024 33 31 34 #define SHORT_TO_FLOAT(x) (smpl_t)(x * 3.0517578125e-05)32 //#define SHORT_TO_FLOAT(x) (smpl_t)(x * 3.0517578125e-05) 35 33 36 34 struct _aubio_source_wavread_t { … … 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.