#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 */