Changeset 26bd5e0 for src


Ignore:
Timestamp:
Dec 23, 2018, 12:06:32 AM (6 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/timestretch, fix/ffmpeg5, master
Children:
b03f1bf
Parents:
9d609355
Message:

[lib] add AUBIO_STRERR to log system error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    r9d609355 r26bd5e0  
    6161#ifdef HAVE_STRING_H
    6262#include <string.h>
     63#endif
     64
     65#ifdef HAVE_ERRNO_H
     66#include <errno.h>
    6367#endif
    6468
     
    331335#endif
    332336
     337#ifdef HAVE_C99_VARARGS_MACROS
     338#define AUBIO_STRERR(...)            \
     339    char errorstr[256]; \
     340    AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); \
     341    AUBIO_ERR(__VA_ARGS__)
     342#else
     343#define AUBIO_STRERR(format, args...)   \
     344    char errorstr[256]; \
     345    AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); \
     346    AUBIO_ERR(format, ##args)
     347#endif
     348
    333349/* handy shortcuts */
    334350#define DB2LIN(g) (POW(10.0,(g)*0.05f))
Note: See TracChangeset for help on using the changeset viewer.