From: Paul Brossier Date: Thu, 17 Sep 2009 05:09:57 +0000 (+0200) Subject: src/types.h: add a switch between single and double precision X-Git-Tag: bzr2git~349 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b16fc82d8bdcc7668e31ce776aabc9237a422c0c;p=aubio.git src/types.h: add a switch between single and double precision --- 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 */