Changeset 439ba7b for src/aubio_priv.h


Ignore:
Timestamp:
Apr 1, 2019, 1:30:06 AM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
7a02ce9
Parents:
5f57ea9 (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/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    r5f57ea9 r439ba7b  
    6363#endif
    6464
     65#ifdef HAVE_ERRNO_H
     66#include <errno.h>
     67#endif
     68
    6569#ifdef HAVE_LIMITS_H
    6670#include <limits.h> // for CHAR_BIT, in C99 standard
     
    7175#endif
    7276
    73 #if defined(HAVE_ACCELERATE)
    74 #define HAVE_ATLAS 1
    75 #define HAVE_BLAS 1
    76 #include <Accelerate/Accelerate.h>
    77 #elif defined(HAVE_ATLAS_CBLAS_H)
    78 #elif defined(HAVE_BLAS)
     77#if defined(HAVE_BLAS) // --enable-blas=true
     78// check which cblas header we found
    7979#if defined(HAVE_ATLAS_CBLAS_H)
    8080#define HAVE_ATLAS 1
     
    8484#elif defined(HAVE_CBLAS_H)
    8585#include <cblas.h>
    86 #endif
    87 #endif
    88 
    89 #ifdef HAVE_ACCELERATE
     86#elif !defined(HAVE_ACCELERATE)
     87#error "HAVE_BLAS was defined, but no blas header was found"
     88#endif /* end of cblas includes */
     89#endif
     90
     91#if defined(HAVE_ACCELERATE)
     92// include accelerate framework after blas
     93#define HAVE_ATLAS 1
     94#define HAVE_BLAS 1
    9095#include <Accelerate/Accelerate.h>
     96
    9197#ifndef HAVE_AUBIO_DOUBLE
    9298#define aubio_vDSP_mmov       vDSP_mmov
     
    325331#endif
    326332
     333#if !defined(_MSC_VER)
     334#define AUBIO_STRERROR(errno,buf,len) strerror_r(errno, buf, len)
     335#else
     336#define AUBIO_STRERROR(errno,buf,len) strerror_s(buf, len, errno)
     337#endif
     338
     339#ifdef HAVE_C99_VARARGS_MACROS
     340#define AUBIO_STRERR(...)            \
     341    char errorstr[256]; \
     342    AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); \
     343    AUBIO_ERR(__VA_ARGS__)
     344#else
     345#define AUBIO_STRERR(format, args...)   \
     346    char errorstr[256]; \
     347    AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); \
     348    AUBIO_ERR(format, ##args)
     349#endif
     350
    327351/* handy shortcuts */
    328352#define DB2LIN(g) (POW(10.0,(g)*0.05f))
Note: See TracChangeset for help on using the changeset viewer.