Index: src/spectral/fft.c
===================================================================
--- src/spectral/fft.c	(revision 4b943729b9f24bb74b253030e772ae12ddc01f49)
+++ src/spectral/fft.c	(revision 0ad2e175e503afc61ee0d1168f748457ed36072d)
@@ -114,7 +114,26 @@
 #elif defined HAVE_INTEL_IPP // using INTEL IPP
 
-#include <ippcore.h>
-#include <ippvm.h>
-#include <ipps.h>
+#if !HAVE_AUBIO_DOUBLE
+#define aubio_IppFloat                 Ipp32f
+#define aubio_IppComplex               Ipp32fc
+#define aubio_FFTSpec                  FFTSpec_R_32f
+#define aubio_ippsPhas                 ippsPhase_32fc
+#define aubio_ippsMalloc_complex       ippsMalloc_32fc
+#define aubio_ippsFFTInit_R            ippsFFTInit_R_32f
+#define aubio_ippsFFTGetSize_R         ippsFFTGetSize_R_32f
+#define aubio_ippsFFTInv_CCSToR        ippsFFTInv_CCSToR_32f
+#define aubio_ippsFFTFwd_RToCCS        ippsFFTFwd_RToCCS_32f
+#else /* HAVE_AUBIO_DOUBLE */
+#define aubio_IppFloat                 Ipp64f
+#define aubio_IppComplex               Ipp64fc
+#define aubio_FFTSpec                  FFTSpec_R_64f
+#define aubio_ippsPhas                 ippsPhase_64fc
+#define aubio_ippsMalloc_complex       ippsMalloc_64fc
+#define aubio_ippsFFTInit_R            ippsFFTInit_R_64f
+#define aubio_ippsFFTGetSize_R         ippsFFTGetSize_R_64f
+#define aubio_ippsFFTInv_CCSToR        ippsFFTInv_CCSToR_64f
+#define aubio_ippsFFTFwd_RToCCS        ippsFFTFwd_RToCCS_64f
+#endif
+
 
 #else // using OOURA
@@ -146,11 +165,6 @@
   Ipp8u* memInit;
   Ipp8u* memBuffer;
-  #if HAVE_AUBIO_DOUBLE
-    struct FFTSpec_R_64f* fftSpec;
-    Ipp64fc* complexOut;
-  #else
-    struct FFTSpec_R_32f* fftSpec;
-    Ipp32fc* complexOut;
-  #endif
+  struct aubio_FFTSpec* fftSpec;
+  aubio_IppComplex* complexOut;
 #else                         // using OOURA
   smpl_t *in, *out;
@@ -223,11 +237,6 @@
   }
 
-#if HAVE_AUBIO_DOUBLE
-  status = ippsFFTGetSize_R_64f(order, flags, qualityHint,
+  status = aubio_ippsFFTGetSize_R(order, flags, qualityHint,
       &sizeSpec, &sizeInit, &sizeBuffer);
-#else
-  status = ippsFFTGetSize_R_32f(order, flags, qualityHint,
-    &sizeSpec, &sizeInit, &sizeBuffer);
-#endif
   if (status != ippStsNoErr) {
     AUBIO_ERR("fft: failed to initialize fft. IPP error: %d\n", status);
@@ -243,13 +252,7 @@
     s->memInit = ippsMalloc_8u(sizeInit);
   }
-#if HAVE_AUBIO_DOUBLE
-  s->complexOut = ippsMalloc_64fc(s->fft_size / 2 + 1);
-  status = ippsFFTInit_R_64f(
+  s->complexOut = aubio_ippsMalloc_complex(s->fft_size / 2 + 1);
+  status = aubio_ippsFFTInit_R(
     &s->fftSpec, order, flags, qualityHint, s->memSpec, s->memInit);
-#else
-  s->complexOut = ippsMalloc_32fc(s->fft_size / 2 + 1);
-  status = ippsFFTInit_R_32f(
-    &s->fftSpec, order, flags, qualityHint, s->memSpec, s->memInit);
-#endif
   if (status != ippStsNoErr) {
     AUBIO_ERR("fft: failed to initialize. IPP error: %d\n", status);
@@ -365,9 +368,5 @@
 
   // apply fft
-#if HAVE_AUBIO_DOUBLE
-  ippsFFTFwd_RToCCS_64f(s->in, (Ipp64f*)s->complexOut, s->fftSpec, s->memBuffer);
-#else
-  ippsFFTFwd_RToCCS_32f(s->in, (Ipp32f*)s->complexOut, s->fftSpec, s->memBuffer);
-#endif
+  aubio_ippsFFTFwd_RToCCS(s->in, (aubio_IppFloat*)s->complexOut, s->fftSpec, s->memBuffer);
   // convert complex buffer to [ r0, r1, ..., rN, iN-1, .., i2, i1]
   compspec->data[0] = s->complexOut[0].re;
@@ -378,9 +377,5 @@
   }
   // apply scaling
-#if HAVE_AUBIO_DOUBLE
-  ippsMulC_64f(compspec->data, 1.0 / 2.0, compspec->data, s->fft_size);
-#else
-  ippsMulC_32f(compspec->data, 1.0 / 2.0, compspec->data, s->fft_size);
-#endif
+  aubio_ippsMulC(compspec->data, 1.0 / 2.0, compspec->data, s->fft_size);
 
 #else                         // using OOURA
@@ -446,15 +441,8 @@
     s->complexOut[i].im = compspec->data[s->fft_size - i];
   }
-#if HAVE_AUBIO_DOUBLE
   // apply fft
-  ippsFFTInv_CCSToR_64f((const Ipp64f *)s->complexOut, output->data, s->fftSpec, s->memBuffer);
+  aubio_ippsFFTInv_CCSToR((const aubio_IppFloat *)s->complexOut, output->data, s->fftSpec, s->memBuffer);
   // apply scaling
-  ippsMulC_64f(output->data, 2.0 / s->winsize, output->data, s->fft_size);
-#else
-  // apply fft
-  ippsFFTInv_CCSToR_32f((const Ipp32f *)s->complexOut, output->data, s->fftSpec, s->memBuffer);
-  // apply scaling
-  ippsMulC_32f(output->data, 2.0f / s->winsize, output->data, s->fft_size);
-#endif /* HAVE_AUBIO_DOUBLE */
+  aubio_ippsMulC(output->data, 1.0 / s->winsize, output->data, s->fft_size);
 
 #else                         // using OOURA
@@ -497,10 +485,6 @@
     s->complexOut[i].im = compspec->data[compspec->length - i];
   }
-  
-#if HAVE_AUBIO_DOUBLE
-  IppStatus status = ippsPhase_64fc(s->complexOut, spectrum->phas, spectrum->length);
-#else
-  IppStatus status = ippsPhase_32fc(s->complexOut, spectrum->phas, spectrum->length);
-#endif
+
+  IppStatus status = aubio_ippsPhas(s->complexOut, spectrum->phas, spectrum->length);
   if (status != ippStsNoErr) {
     AUBIO_ERR("fft: failed to extract phase from fft. IPP error: %d\n", status);
