Changeset dffe76f for src


Ignore:
Timestamp:
Sep 17, 2009, 7:14:19 AM (15 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/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
4369cb9
Parents:
b16fc82
Message:

src/aubio_priv.h: add AUBIO_WRN, add message to _WRN and _ERR, use double precision functions if AUBIO_SINGLE_PRECISION is not defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    rb16fc82 rdffe76f  
    106106
    107107#ifdef HAVE_C99_VARARGS_MACROS
    108 #define AUBIO_ERR(...)               fprintf(stderr,__VA_ARGS__)
    109 #define AUBIO_MSG(...)               fprintf(stdout,__VA_ARGS__)
    110 #define AUBIO_DBG(...)               fprintf(stderr,__VA_ARGS__)
     108#define AUBIO_ERR(...)               fprintf(stderr, "AUBIO ERROR: " __VA_ARGS__)
     109#define AUBIO_MSG(...)               fprintf(stdout, __VA_ARGS__)
     110#define AUBIO_DBG(...)               fprintf(stderr, __VA_ARGS__)
     111#define AUBIO_WRN(...)               fprintf(stderr, "AUBIO WARNING: " __VA_ARGS__)
    111112#else
    112 #define AUBIO_ERR(format, args...)   fprintf(stderr, format , ##args)
     113#define AUBIO_ERR(format, args...)   fprintf(stderr, "AUBIO ERROR: " format , ##args)
    113114#define AUBIO_MSG(format, args...)   fprintf(stdout, format , ##args)
    114115#define AUBIO_DBG(format, args...)   fprintf(stderr, format , ##args)
     116#define AUBIO_WRN(...)               fprintf(stderr, "AUBIO WARNING: " format, ##args)
    115117#endif
    116118
     
    123125
    124126/* aliases to math.h functions */
     127#if AUBIO_SINGLE_PRECISION
    125128#define EXP        expf
    126129#define COS        cosf
     
    133136#define FLOOR      floorf
    134137#define CEIL       ceilf
     138#else
     139#define EXP        exp
     140#define COS        cos
     141#define SIN        sin
     142#define ABS        fabs
     143#define POW        pow
     144#define SQRT       sqrt
     145#define LOG10      log10
     146#define LOG        log
     147#define FLOOR      floor
     148#define CEIL       ceil
     149#endif
    135150#define ROUND(x)   FLOOR(x+.5)
    136151
    137152/* aliases to complex.h functions */
    138 #if !defined(HAVE_COMPLEX_H) || defined(WIN32)
     153#if !defined(AUBIO_SINGLE_PRECISION) || !defined(HAVE_COMPLEX_H) || defined(WIN32)
    139154/* mingw32 does not know about c*f functions */
    140155#define EXPC      cexp
Note: See TracChangeset for help on using the changeset viewer.