From b16fc82d8bdcc7668e31ce776aabc9237a422c0c Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 17 Sep 2009 07:09:57 +0200 Subject: [PATCH] src/types.h: add a switch between single and double precision --- src/types.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/types.h b/src/types.h index f6f4829e..29515ac1 100644 --- a/src/types.h +++ b/src/types.h @@ -39,11 +39,21 @@ extern "C" { #endif /** short sample format (32 or 64 bits) */ +#if AUBIO_SINGLE_PRECISION typedef float smpl_t; -//typedef double smpl_t; +#define AUBIO_SMPL_FMT "%f" +#else +typedef double smpl_t; +#define AUBIO_SMPL_FMT "%lf" +#endif /** long sample format (64 bits or more) */ +#if AUBIO_SINGLE_PRECISION typedef double lsmp_t; -//typedef long lsmp_t; +#define AUBIO_LSMP_FMT "%lf" +#else +typedef long double lsmp_t; +#define AUBIO_LSMP_FMT "%Lf" +#endif /** unsigned integer */ typedef unsigned int uint_t; /** signed integer */ -- 2.26.2