typedef jack_default_audio_sample_t jack_sample_t;
-#if !AUBIO_SINGLE_PRECISION
+#if HAVE_AUBIO_DOUBLE
#define AUBIO_JACK_MAX_FRAMES 4096
#define AUBIO_JACK_NEEDS_CONVERSION
#endif
#define TWO_PI (PI*2.)
/* aliases to math.h functions */
-#if AUBIO_SINGLE_PRECISION
+#if !HAVE_AUBIO_DOUBLE
#define EXP expf
#define COS cosf
#define SIN sinf
#define ROUND(x) FLOOR(x+.5)
/* aliases to complex.h functions */
-#if !defined(AUBIO_SINGLE_PRECISION) || !defined(HAVE_COMPLEX_H) || defined(WIN32)
+#if HAVE_AUBIO_DOUBLE || !defined(HAVE_COMPLEX_H) || defined(WIN32)
/* mingw32 does not know about c*f functions */
#define EXPC cexp
/** complex = CEXPC(complex) */
#include "config.h"
#ifndef HAVE_AUBIO_DOUBLE
+/** defined to 1 if aubio is compiled in double precision */
#define HAVE_AUBIO_DOUBLE 0
#endif
-#if HAVE_AUBIO_DOUBLE
-#define AUBIO_SINGLE_PRECISION 0
-#else
-#define AUBIO_SINGLE_PRECISION 1
-#endif
-
/** short sample format (32 or 64 bits) */
-#if AUBIO_SINGLE_PRECISION
+#if !HAVE_AUBIO_DOUBLE
typedef float smpl_t;
+/** print format for sample in single precision */
#define AUBIO_SMPL_FMT "%f"
#else
typedef double smpl_t;
+/** print format for double in single precision */
#define AUBIO_SMPL_FMT "%lf"
#endif
/** long sample format (64 bits or more) */
-#if AUBIO_SINGLE_PRECISION
+#if !HAVE_AUBIO_DOUBLE
typedef double lsmp_t;
+/** print format for sample in double precision */
#define AUBIO_LSMP_FMT "%lf"
#else
typedef long double lsmp_t;
+/** print format for double in double precision */
#define AUBIO_LSMP_FMT "%Lf"
#endif
/** unsigned integer */