Ignore:
Timestamp:
Mar 31, 2019, 11:12:40 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
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.
Message:

Merge branch 'master' into feature/autosink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    r08246ee r1dfe409  
    2828#include "source_wavread.h"
    2929
    30 #include <errno.h>
    31 
    3230#define AUBIO_WAVREAD_BUFSIZE 1024
    3331
    34 #define SHORT_TO_FLOAT(x) (smpl_t)(x * 3.0517578125e-05)
     32//#define SHORT_TO_FLOAT(x) (smpl_t)(x * 3.0517578125e-05)
    3533
    3634struct _aubio_source_wavread_t {
     
    10199  s->fid = fopen((const char *)path, "rb");
    102100  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);
    104102    goto beach;
    105103  }
     
    134132    bytes_junk += read_little_endian(buf, 4);
    135133    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);
    138136      goto beach;
    139137    }
     
    262260    bytes_junk += read_little_endian(buf, 4);
    263261    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);
    266264      goto beach;
    267265    }
     
    443441  ret = fseek(s->fid, s->seek_start + pos * s->blockalign, SEEK_SET);
    444442  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);
    446444    return AUBIO_FAIL;
    447445  }
     
    464462  }
    465463  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);
    467465    return AUBIO_FAIL;
    468466  }
Note: See TracChangeset for help on using the changeset viewer.