+#define AUBIO_MAX_SAMPLERATE (192000*8)
+#define AUBIO_MAX_CHANNELS 1024
+
+/* pi and 2*pi */
+#ifndef M_PI
+#define PI (3.14159265358979323846)
+#else
+#define PI (M_PI)
+#endif
+#define TWO_PI (PI*2.)
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+/* aliases to math.h functions */
+#if !HAVE_AUBIO_DOUBLE
+#define EXP expf
+#define COS cosf
+#define SIN sinf
+#define ABS fabsf
+#define POW powf
+#define SQRT sqrtf
+#define LOG10 log10f
+#define LOG logf
+#define FLOOR floorf
+#define CEIL ceilf
+#define ATAN atanf
+#define ATAN2 atan2f
+#else
+#define EXP exp
+#define COS cos
+#define SIN sin
+#define ABS fabs
+#define POW pow
+#define SQRT sqrt
+#define LOG10 log10
+#define LOG log
+#define FLOOR floor
+#define CEIL ceil
+#define ATAN atan
+#define ATAN2 atan2
+#endif
+#define ROUND(x) FLOOR(x+.5)
+
+/* aliases to complex.h functions */
+#if HAVE_AUBIO_DOUBLE || !defined(HAVE_COMPLEX_H) || defined(WIN32)
+/* mingw32 does not know about c*f functions */
+#define EXPC cexp
+/** complex = CEXPC(complex) */
+#define CEXPC cexp
+/** sample = ARGC(complex) */
+#define ARGC carg
+/** sample = ABSC(complex) norm */
+#define ABSC cabs
+/** sample = REAL(complex) */
+#define REAL creal
+/** sample = IMAG(complex) */
+#define IMAG cimag
+#else
+/** sample = EXPC(complex) */
+#define EXPC cexpf
+/** complex = CEXPC(complex) */
+#define CEXPC cexp
+/** sample = ARGC(complex) */
+#define ARGC cargf
+/** sample = ABSC(complex) norm */
+#define ABSC cabsf
+/** sample = REAL(complex) */
+#define REAL crealf
+/** sample = IMAG(complex) */
+#define IMAG cimagf
+#endif
+
+/* avoid unresolved symbol with msvc 9 */
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define isnan _isnan
+#endif
+
+/* handy shortcuts */
+#define DB2LIN(g) (POW(10.0,(g)*0.05f))
+#define LIN2DB(v) (20.0*LOG10(v))
+#define SQR(_a) ((_a)*(_a))
+
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif /* MAX */
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif /* MIN */
+
+#define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
+
+#define VERY_SMALL_NUMBER 2.e-42 //1.e-37
+
+/** if ABS(f) < VERY_SMALL_NUMBER, returns 1, else 0 */
+#define IS_DENORMAL(f) ABS(f) < VERY_SMALL_NUMBER
+
+/** if ABS(f) < VERY_SMALL_NUMBER, returns 0., else f */
+#define KILL_DENORMAL(f) IS_DENORMAL(f) ? 0. : f
+
+/** if f > VERY_SMALL_NUMBER, returns f, else returns VERY_SMALL_NUMBER */
+#define CEIL_DENORMAL(f) f < VERY_SMALL_NUMBER ? VERY_SMALL_NUMBER : f
+
+#define SAFE_LOG10(f) LOG10(CEIL_DENORMAL(f))
+#define SAFE_LOG(f) LOG(CEIL_DENORMAL(f))
+
+/** silence unused parameter warning by adding an attribute */
+#if defined(__GNUC__)
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+
+/* are we using gcc -std=c99 ? */
+#if defined(__STRICT_ANSI__)
+#define strnlen(a,b) MIN(strlen(a),b)
+#if !HAVE_AUBIO_DOUBLE
+#define floorf floor
+#endif
+#endif /* __STRICT_ANSI__ */
+
+#endif /* AUBIO_PRIV_H */