ref: f3bee7942e1bf543557dfe1c364debdfd25a1153
parent: e6c11e31e5a245948f1cdd1c9df4b3863759a073
author: Paul Brossier <piem@piem.org>
date: Thu Oct 1 13:41:07 EDT 2009
src/spectral/fft.{c,h}: move fftw3.h include inside fft.c
--- a/src/spectral/fft.c
+++ b/src/spectral/fft.c
@@ -23,6 +23,31 @@
#include "mathutils.h"
#include "spectral/fft.h"
+/* note that <complex.h> is not included here but only in aubio_priv.h, so that
+ * c++ projects can still use their own complex definition. */
+#include <fftw3.h>
+
+#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
--- a/src/spectral/fft.h
+++ b/src/spectral/fft.h
@@ -26,34 +26,9 @@
#ifndef FFT_H_
#define FFT_H_
-/* note that <complex.h> is not included here but only in aubio_priv.h, so that
- * c++ projects can still use their own complex definition. */
-#include <fftw3.h>
-
-#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