From: Paul Brossier Date: Thu, 1 Oct 2009 15:41:07 +0000 (+0200) Subject: src/spectral/fft.{c,h}: move fftw3.h include inside fft.c X-Git-Tag: bzr2git~236 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f3bee7942e1bf543557dfe1c364debdfd25a1153;p=aubio.git src/spectral/fft.{c,h}: move fftw3.h include inside fft.c --- diff --git a/src/spectral/fft.c b/src/spectral/fft.c index 9403d7f4..7814b301 100644 --- a/src/spectral/fft.c +++ b/src/spectral/fft.c @@ -23,6 +23,31 @@ #include "mathutils.h" #include "spectral/fft.h" +/* note that is not included here but only in aubio_priv.h, so that + * c++ projects can still use their own complex definition. */ +#include + +#ifdef HAVE_COMPLEX_H +#if HAVE_FFTW3F +/** fft data type with complex.h and fftw3f */ +#define FFTW_TYPE fftwf_complex +#else +/** fft data type with complex.h and fftw3 */ +#define FFTW_TYPE fftw_complex +#endif +#else +#if HAVE_FFTW3F +/** fft data type without complex.h and with fftw3f */ +#define FFTW_TYPE float +#else +/** fft data type without complex.h and with fftw */ +#define FFTW_TYPE double +#endif +#endif + +/** fft data type */ +typedef FFTW_TYPE fft_data_t; + #if HAVE_FFTW3F #define fftw_malloc fftwf_malloc #define fftw_free fftwf_free diff --git a/src/spectral/fft.h b/src/spectral/fft.h index ae63c1c7..774e7513 100644 --- a/src/spectral/fft.h +++ b/src/spectral/fft.h @@ -26,35 +26,10 @@ #ifndef FFT_H_ #define FFT_H_ -/* note that is not included here but only in aubio_priv.h, so that - * c++ projects can still use their own complex definition. */ -#include - -#ifdef HAVE_COMPLEX_H -#if HAVE_FFTW3F -/** fft data type with complex.h and fftw3f */ -#define FFTW_TYPE fftwf_complex -#else -/** fft data type with complex.h and fftw3 */ -#define FFTW_TYPE fftw_complex -#endif -#else -#if HAVE_FFTW3F -/** fft data type without complex.h and with fftw3f */ -#define FFTW_TYPE float -#else -/** fft data type without complex.h and with fftw */ -#define FFTW_TYPE double -#endif -#endif - #ifdef __cplusplus extern "C" { #endif -/** fft data type */ -typedef FFTW_TYPE fft_data_t; - /** FFT object This object computes forward and backward FFTs, using the complex type to