Changeset 70ba6dd for src


Ignore:
Timestamp:
Sep 5, 2015, 11:42:41 AM (9 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:
a65d37a
Parents:
cc81763
Message:

src/aubio_priv.h: protect SQR parameters, avoid redefining MIN/MAX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    rcc81763 r70ba6dd  
    197197#define DB2LIN(g) (POW(10.0,(g)*0.05f))
    198198#define LIN2DB(v) (20.0*LOG10(v))
    199 #define SQR(_a)   (_a*_a)
    200 
    201 #define MAX(a,b)  ( a > b ? a : b)
    202 #define MIN(a,b)  ( a < b ? a : b)
     199#define SQR(_a)   ((_a)*(_a))
     200
     201#ifndef MAX
     202#define MAX(a,b)  (((a)>(b))?(a):(b))
     203#endif /* MAX */
     204#ifndef MIN
     205#define MIN(a,b)  (((a)<(b))?(a):(b))
     206#endif /* MIN */
    203207
    204208#define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
Note: See TracChangeset for help on using the changeset viewer.