Index: examples/utils.c
===================================================================
--- examples/utils.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ examples/utils.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -87,4 +87,6 @@
 void examples_common_init (int argc, char **argv)
 {
+  /* initialize statics */
+  aubio_init();
 
   /* parse command line arguments */
Index: src/cvec.c
===================================================================
--- src/cvec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/cvec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -21,4 +21,10 @@
 #include "aubio_priv.h"
 #include "cvec.h"
+
+#if defined HAVE_INTEL_IPP
+#include <ippcore.h>
+#include <ippvm.h>
+#include <ipps.h>
+#endif
 
 cvec_t * new_cvec(uint_t length) {
@@ -86,8 +92,16 @@
     return;
   }
-#ifdef HAVE_MEMCPY_HACKS
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsCopy_64f(s->phas, t->phas, (int)s->length);
+    ippsCopy_64f(s->norm, t->norm, (int)s->length);
+  #else
+    ippsCopy_32f(s->phas, t->phas, (int)s->length);
+    ippsCopy_32f(s->norm, t->norm, (int)s->length);
+  #endif
+#elif defined(HAVE_MEMCPY_HACKS)
   memcpy(t->norm, s->norm, t->length * sizeof(smpl_t));
   memcpy(t->phas, s->phas, t->length * sizeof(smpl_t));
-#else /* HAVE_MEMCPY_HACKS */
+#else
   uint_t j;
   for (j=0; j< t->length; j++) {
@@ -95,20 +109,34 @@
     t->phas[j] = s->phas[j];
   }
-#endif /* HAVE_MEMCPY_HACKS */
-}
-
-void cvec_norm_set_all (cvec_t *s, smpl_t val) {
+#endif
+}
+
+void cvec_norm_set_all(cvec_t *s, smpl_t val) {
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsSet_64f(val, s->norm, (int)s->length);
+  #else
+    ippsSet_32f(val, s->norm, (int)s->length);
+  #endif
+#else
   uint_t j;
   for (j=0; j< s->length; j++) {
     s->norm[j] = val;
   }
+#endif
 }
 
 void cvec_norm_zeros(cvec_t *s) {
-#ifdef HAVE_MEMCPY_HACKS
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsZero_64f(s->norm, (int)s->length);
+  #else
+    ippsZero_32f(s->norm, (int)s->length);
+  #endif
+#elif defined(HAVE_MEMCPY_HACKS)
   memset(s->norm, 0, s->length * sizeof(smpl_t));
-#else /* HAVE_MEMCPY_HACKS */
+#else 
   cvec_norm_set_all (s, 0.);
-#endif /* HAVE_MEMCPY_HACKS */
+#endif
 }
 
@@ -118,12 +146,26 @@
 
 void cvec_phas_set_all (cvec_t *s, smpl_t val) {
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsSet_64f(val, s->phas, (int)s->length);
+  #else
+    ippsSet_32f(val, s->phas, (int)s->length);
+  #endif
+#else
   uint_t j;
   for (j=0; j< s->length; j++) {
     s->phas[j] = val;
   }
+#endif
 }
 
 void cvec_phas_zeros(cvec_t *s) {
-#ifdef HAVE_MEMCPY_HACKS
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsZero_64f(s->phas, (int)s->length);
+  #else
+    ippsZero_32f(s->phas, (int)s->length);
+  #endif
+#elif defined(HAVE_MEMCPY_HACKS)
   memset(s->phas, 0, s->length * sizeof(smpl_t));
 #else
@@ -142,7 +184,19 @@
 
 void cvec_logmag(cvec_t *s, smpl_t lambda) {
-  uint_t j;
-  for (j=0; j< s->length; j++) {
-    s->norm[j] = LOG(lambda * s->norm[j] + 1);
-  }
-}
+  #if defined(HAVE_INTEL_IPP)
+    #if HAVE_AUBIO_DOUBLE
+      ippsMulC_64f(s->norm, lambda, s->norm, (int)s->length);
+      ippsAddC_64f(s->norm, 1.0, s->norm, (int)s->length);
+      ippsLn_64f_A26(s->norm, s->norm, (int)s->length);
+    #else
+      ippsMulC_32f(s->norm, lambda, s->norm, (int)s->length);
+      ippsAddC_32f(s->norm, 1.0, s->norm, (int)s->length);
+      ippsLn_32f_A21(s->norm, s->norm, (int)s->length);
+    #endif
+  #else
+    uint_t j;
+    for (j=0; j< s->length; j++) {
+      s->norm[j] = LOG(lambda * s->norm[j] + 1);
+    }
+  #endif
+}
Index: src/fvec.c
===================================================================
--- src/fvec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/fvec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -21,4 +21,10 @@
 #include "aubio_priv.h"
 #include "fvec.h"
+
+#if defined HAVE_INTEL_IPP
+#include <ippcore.h>
+#include <ippvm.h>
+#include <ipps.h>
+#endif
 
 fvec_t * new_fvec(uint_t length) {
@@ -61,25 +67,36 @@
 
 void fvec_set_all (fvec_t *s, smpl_t val) {
-#if !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS)
-  uint_t j;
-  for (j=0; j< s->length; j++) {
-    s->data[j] = val;
-  }
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsSet_64f(val, s->data, (int)s->length);
+  #else
+    ippsSet_32f(val, s->data, (int)s->length);
+  #endif
 #elif defined(HAVE_ATLAS)
   aubio_catlas_set(s->length, val, s->data, 1);
 #elif defined(HAVE_ACCELERATE)
   aubio_vDSP_vfill(&val, s->data, 1, s->length);
+#else
+  uint_t j;
+  for ( j = 0; j< s->length; j++ )
+  {
+    s->data[j] = val;
+  }
 #endif
 }
 
 void fvec_zeros(fvec_t *s) {
-#if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE)
-  fvec_set_all (s, 0.);
-#else
-#if defined(HAVE_MEMCPY_HACKS)
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsZero_64f(s->data, (int)s->length);
+  #else
+    ippsZero_32f(s->data, (int)s->length);
+  #endif
+#elif defined(HAVE_ACCELERATE)
+  aubio_vDSP_vclr(s->data, 1, s->length);
+#elif defined(HAVE_MEMCPY_HACKS)
   memset(s->data, 0, s->length * sizeof(smpl_t));
 #else
-  aubio_vDSP_vclr(s->data, 1, s->length);
-#endif
+  fvec_set_all(s, 0.);
 #endif
 }
@@ -97,25 +114,37 @@
 
 void fvec_weight(fvec_t *s, const fvec_t *weight) {
-#ifndef HAVE_ACCELERATE
+  uint_t length = MIN(s->length, weight->length);
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsMul_64f(s->data, weight->data, s->data, (int)length);
+  #else
+    ippsMul_32f(s->data, weight->data, s->data, (int)length);
+  #endif
+#elif defined(HAVE_ACCELERATE) 
+  aubio_vDSP_vmul( s->data, 1, weight->data, 1, s->data, 1, length );
+#else
   uint_t j;
-  uint_t length = MIN(s->length, weight->length);
-  for (j=0; j< length; j++) {
+  for (j = 0; j < length; j++) {
     s->data[j] *= weight->data[j];
   }
-#else
-  aubio_vDSP_vmul(s->data, 1, weight->data, 1, s->data, 1, s->length);
 #endif /* HAVE_ACCELERATE */
 }
 
 void fvec_weighted_copy(const fvec_t *in, const fvec_t *weight, fvec_t *out) {
-#ifndef HAVE_ACCELERATE
+  uint_t length = MIN(in->length, MIN(out->length, weight->length));
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsMul_64f(in->data, weight->data, out->data, (int)length);
+  #else
+    ippsMul_32f(in->data, weight->data, out->data, (int)length);
+  #endif
+#elif defined(HAVE_ACCELERATE) 
+  aubio_vDSP_vmul(in->data, 1, weight->data, 1, out->data, 1, length);
+#else
   uint_t j;
-  uint_t length = MIN(out->length, weight->length);
-  for (j=0; j< length; j++) {
+  for (j = 0; j < length; j++) {
     out->data[j] = in->data[j] * weight->data[j];
   }
-#else
-  aubio_vDSP_vmul(in->data, 1, weight->data, 1, out->data, 1, out->length);
-#endif /* HAVE_ACCELERATE */
+#endif
 }
 
@@ -126,15 +155,21 @@
     return;
   }
-#ifdef HAVE_NOOPT
-  uint_t j;
-  for (j=0; j< t->length; j++) {
-    t->data[j] = s->data[j];
-  }
-#elif defined(HAVE_MEMCPY_HACKS)
-  memcpy(t->data, s->data, t->length * sizeof(smpl_t));
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsCopy_64f(s->data, t->data, (int)s->length);
+  #else
+    ippsCopy_32f(s->data, t->data, (int)s->length);
+  #endif
 #elif defined(HAVE_ATLAS)
   aubio_cblas_copy(s->length, s->data, 1, t->data, 1);
 #elif defined(HAVE_ACCELERATE)
   aubio_vDSP_mmov(s->data, t->data, 1, s->length, 1, 1);
+#elif defined(HAVE_MEMCPY_HACKS)
+  memcpy(t->data, s->data, t->length * sizeof(smpl_t));
+#else
+  uint_t j;
+  for (j = 0; j < t->length; j++) {
+    t->data[j] = s->data[j];
+  }
 #endif
 }
Index: src/mathutils.c
===================================================================
--- src/mathutils.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/mathutils.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -25,4 +25,10 @@
 #include "mathutils.h"
 #include "musicutils.h"
+
+#if defined HAVE_INTEL_IPP
+#include <ippcore.h>
+#include <ippvm.h>
+#include <ipps.h>
+#endif
 
 /** Window types */
@@ -155,14 +161,21 @@
 {
   smpl_t tmp = 0.0;
-#ifndef HAVE_ACCELERATE
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsMean_64f(s->data, (int)s->length, &tmp);
+  #else
+    ippsMean_32f(s->data, (int)s->length, &tmp, ippAlgHintFast);
+  #endif
+    return tmp;
+#elif defined(HAVE_ACCELERATE)
+  aubio_vDSP_meanv(s->data, 1, &tmp, s->length);
+  return tmp;
+#else
   uint_t j;
   for (j = 0; j < s->length; j++) {
     tmp += s->data[j];
   }
-  return tmp / (smpl_t) (s->length);
-#else
-  aubio_vDSP_meanv(s->data, 1, &tmp, s->length);
-  return tmp;
-#endif /* HAVE_ACCELERATE */
+  return tmp / (smpl_t)(s->length);
+#endif
 }
 
@@ -171,12 +184,18 @@
 {
   smpl_t tmp = 0.0;
-#ifndef HAVE_ACCELERATE
+#if defined(HAVE_INTEL_IPP)
+  #if HAVE_AUBIO_DOUBLE
+    ippsSum_64f(s->data, (int)s->length, &tmp);
+  #else
+    ippsSum_32f(s->data, (int)s->length, &tmp, ippAlgHintFast);
+  #endif
+#elif defined(HAVE_ACCELERATE)
+  aubio_vDSP_sve(s->data, 1, &tmp, s->length);
+#else
   uint_t j;
   for (j = 0; j < s->length; j++) {
     tmp += s->data[j];
   }
-#else
-  aubio_vDSP_sve(s->data, 1, &tmp, s->length);
-#endif /* HAVE_ACCELERATE */
+#endif
   return tmp;
 }
@@ -185,29 +204,43 @@
 fvec_max (fvec_t * s)
 {
-#ifndef HAVE_ACCELERATE
-  uint_t j;
-  smpl_t tmp = 0.0;
-  for (j = 0; j < s->length; j++) {
+#if defined(HAVE_INTEL_IPP)
+  smpl_t tmp = 0.;
+  #if HAVE_AUBIO_DOUBLE
+    ippsMax_64f( s->data, (int)s->length, &tmp);
+  #else
+    ippsMax_32f( s->data, (int)s->length, &tmp);
+#endif
+#elif defined(HAVE_ACCELERATE)
+  smpl_t tmp = 0.;
+  aubio_vDSP_maxv( s->data, 1, &tmp, s->length );
+#else
+  uint_t j;
+  smpl_t tmp = s->data[0];
+  for (j = 1; j < s->length; j++) {
     tmp = (tmp > s->data[j]) ? tmp : s->data[j];
   }
-#else
+#endif
+  return tmp;
+}
+
+smpl_t
+fvec_min (fvec_t * s)
+{
+#if defined(HAVE_INTEL_IPP)
   smpl_t tmp = 0.;
-  aubio_vDSP_maxv(s->data, 1, &tmp, s->length);
-#endif
-  return tmp;
-}
-
-smpl_t
-fvec_min (fvec_t * s)
-{
-#ifndef HAVE_ACCELERATE
-  uint_t j;
-  smpl_t tmp = s->data[0];
-  for (j = 0; j < s->length; j++) {
-    tmp = (tmp < s->data[j]) ? tmp : s->data[j];
-  }
-#else
+  #if HAVE_AUBIO_DOUBLE
+    ippsMin_64f(s->data, (int)s->length, &tmp);
+  #else
+    ippsMin_32f(s->data, (int)s->length, &tmp);
+#endif
+#elif defined(HAVE_ACCELERATE)
   smpl_t tmp = 0.;
   aubio_vDSP_minv(s->data, 1, &tmp, s->length);
+#else
+  uint_t j;
+  smpl_t tmp = s->data[0];
+  for (j = 1; j < s->length; j++) {
+    tmp = (tmp < s->data[j]) ? tmp : s->data[j];
+  }
 #endif
   return tmp;
@@ -570,4 +603,15 @@
 }
 
+uint_t
+aubio_power_of_two_order (uint_t a)
+{
+  int order = 0; 
+  int temp = aubio_next_power_of_two(a);
+  while (temp >>= 1) {
+    ++order;
+  }
+  return order;
+}
+
 smpl_t
 aubio_db_spl (const fvec_t * o)
@@ -634,4 +678,16 @@
 
 void
+aubio_init (void)
+{
+/* initialize intel IPP */
+#ifdef HAVE_INTEL_IPP
+  IppStatus status = ippInit();
+  if (status != ippStsNoErr) {
+    fprintf (stderr, "Error: failed to initialize Intel IPP - status %d\n", status);
+  }
+#endif
+}
+
+void
 aubio_cleanup (void)
 {
Index: src/mathutils.h
===================================================================
--- src/mathutils.h	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/mathutils.h	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -313,4 +313,7 @@
 uint_t aubio_next_power_of_two(uint_t a);
 
+/** return the log2 factor of the given power of 2 value a */
+uint_t aubio_power_of_two_order(uint_t a);
+
 /** compute normalised autocorrelation function
 
Index: src/musicutils.h
===================================================================
--- src/musicutils.h	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/musicutils.h	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -93,4 +93,11 @@
 smpl_t aubio_miditofreq (smpl_t midi);
 
+/** initialize global status at beginning of program
+
+  This function should be used before doing anything else in aubio. 
+  So far it is only used to initialize the Intel IPP library, when it's used.
+*/
+void aubio_init (void);
+
 /** clean up cached memory at the end of program
 
Index: src/spectral/fft.c
===================================================================
--- src/spectral/fft.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/spectral/fft.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -78,6 +78,5 @@
 pthread_mutex_t aubio_fftw_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-#else
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+#elif defined HAVE_ACCELERATE        // using ACCELERATE
 // https://developer.apple.com/library/mac/#documentation/Accelerate/Reference/vDSPRef/Reference/reference.html
 #include <Accelerate/Accelerate.h>
@@ -113,30 +112,51 @@
 #endif /* HAVE_AUBIO_DOUBLE */
 
-#else                         // using OOURA
+#elif defined HAVE_INTEL_IPP // using INTEL IPP
+
+#include <ippcore.h>
+#include <ippvm.h>
+#include <ipps.h>
+
+#else // using OOURA
 // let's use ooura instead
 extern void aubio_ooura_rdft(int, int, smpl_t *, int *, smpl_t *);
 
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
+#endif
 
 struct _aubio_fft_t {
   uint_t winsize;
   uint_t fft_size;
+
 #ifdef HAVE_FFTW3             // using FFTW3
   real_t *in, *out;
   fftw_plan pfw, pbw;
-  fft_data_t * specdata;      /* complex spectral data */
-#else
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+  fft_data_t * specdata; /* complex spectral data */
+
+#elif defined HAVE_ACCELERATE  // using ACCELERATE
   int log2fftsize;
   aubio_FFTSetup fftSetup;
   aubio_DSPSplitComplex spec;
   smpl_t *in, *out;
+  
+#elif defined HAVE_INTEL_IPP  // using Intel IPP
+  // mark FFT impl as Intel IPP
+  #define INTEL_IPP_FFT 1
+  smpl_t *in, *out;
+  Ipp8u* memSpec;
+  Ipp8u* memInit;
+  Ipp8u* memBuffer;
+  #if HAVE_AUBIO_DOUBLE
+    struct FFTSpec_R_64f* fftSpec;
+    Ipp64fc* complexOut;
+  #else
+    struct FFTSpec_R_32f* fftSpec;
+    Ipp32fc* complexOut;
+  #endif
 #else                         // using OOURA
   smpl_t *in, *out;
   smpl_t *w;
   int *ip;
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
+#endif /* using OOURA */
+
   fvec_t * compspec;
 };
@@ -148,4 +168,5 @@
     goto beach;
   }
+
 #ifdef HAVE_FFTW3
   uint_t i;
@@ -176,10 +197,10 @@
     s->specdata[i] = 0.;
   }
-#else
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+
+#elif defined HAVE_ACCELERATE  // using ACCELERATE
   s->winsize = winsize;
   s->fft_size = winsize;
   s->compspec = new_fvec(winsize);
-  s->log2fftsize = (uint_t)log2f(s->fft_size);
+  s->log2fftsize = aubio_power_of_two_order(s->fft_size);
   s->in = AUBIO_ARRAY(smpl_t, s->fft_size);
   s->out = AUBIO_ARRAY(smpl_t, s->fft_size);
@@ -187,4 +208,53 @@
   s->spec.imagp = AUBIO_ARRAY(smpl_t, s->fft_size/2);
   s->fftSetup = aubio_vDSP_create_fftsetup(s->log2fftsize, FFT_RADIX2);
+
+#elif defined HAVE_INTEL_IPP  // using Intel IPP
+  const IppHintAlgorithm qualityHint = ippAlgHintAccurate; // OR ippAlgHintFast;
+  const int flags = IPP_FFT_NODIV_BY_ANY; // we're scaling manually afterwards 
+  int order = aubio_power_of_two_order(winsize);
+  int sizeSpec, sizeInit, sizeBuffer;
+  IppStatus status;
+
+  if (winsize <= 4 || aubio_is_power_of_two(winsize) != 1)
+  {
+    AUBIO_ERR("intel IPP fft: can only create with sizes > 4 and power of two, requested %d,"
+      " try recompiling aubio with --enable-fftw3\n", winsize);
+    goto beach;
+  }
+
+#if HAVE_AUBIO_DOUBLE
+  status = ippsFFTGetSize_R_64f(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);
+    goto beach;
+  }
+  s->fft_size = s->winsize = winsize;
+  s->compspec = new_fvec(winsize);
+  s->in = AUBIO_ARRAY(smpl_t, s->winsize);
+  s->out = AUBIO_ARRAY(smpl_t, s->winsize);
+  s->memSpec = ippsMalloc_8u(sizeSpec);
+  s->memBuffer = ippsMalloc_8u(sizeBuffer);
+  if (sizeInit > 0 ) {
+    s->memInit = ippsMalloc_8u(sizeInit);
+  }
+#if HAVE_AUBIO_DOUBLE
+  s->complexOut = ippsMalloc_64fc(s->fft_size / 2 + 1);
+  status = ippsFFTInit_R_64f(
+    &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);
+    goto beach;
+  }
+
 #else                         // using OOURA
   if (aubio_is_power_of_two(winsize) != 1) {
@@ -201,7 +271,8 @@
   s->w     = AUBIO_ARRAY(smpl_t, s->fft_size);
   s->ip[0] = 0;
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
+#endif /* using OOURA */
+
   return s;
+
 beach:
   AUBIO_FREE(s);
@@ -211,5 +282,4 @@
 void del_aubio_fft(aubio_fft_t * s) {
   /* destroy data */
-  del_fvec(s->compspec);
 #ifdef HAVE_FFTW3             // using FFTW3
   pthread_mutex_lock(&aubio_fftw_mutex);
@@ -218,16 +288,24 @@
   fftw_free(s->specdata);
   pthread_mutex_unlock(&aubio_fftw_mutex);
-#else /* HAVE_FFTW3 */
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+
+#elif defined HAVE_ACCELERATE // using ACCELERATE
   AUBIO_FREE(s->spec.realp);
   AUBIO_FREE(s->spec.imagp);
   aubio_vDSP_destroy_fftsetup(s->fftSetup);
+
+#elif defined HAVE_INTEL_IPP  // using Intel IPP
+  ippFree(s->memSpec);
+  ippFree(s->memInit);
+  ippFree(s->memBuffer);
+  ippFree(s->complexOut);
+
 #else                         // using OOURA
   AUBIO_FREE(s->w);
   AUBIO_FREE(s->ip);
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
+#endif
+
+  del_fvec(s->compspec);
+  AUBIO_FREE(s->in);
   AUBIO_FREE(s->out);
-  AUBIO_FREE(s->in);
   AUBIO_FREE(s);
 }
@@ -235,9 +313,9 @@
 void aubio_fft_do(aubio_fft_t * s, const fvec_t * input, cvec_t * spectrum) {
   aubio_fft_do_complex(s, input, s->compspec);
-  aubio_fft_get_spectrum(s->compspec, spectrum);
+  aubio_fft_get_spectrum(s, s->compspec, spectrum);
 }
 
 void aubio_fft_rdo(aubio_fft_t * s, const cvec_t * spectrum, fvec_t * output) {
-  aubio_fft_get_realimag(spectrum, s->compspec);
+  aubio_fft_get_realimag(s, spectrum, s->compspec);
   aubio_fft_rdo_complex(s, s->compspec, output);
 }
@@ -252,4 +330,5 @@
   memcpy(s->in, input->data, s->winsize * sizeof(smpl_t));
 #endif /* HAVE_MEMCPY_HACKS */
+
 #ifdef HAVE_FFTW3             // using FFTW3
   fftw_execute(s->pfw);
@@ -266,6 +345,6 @@
   }
 #endif /* HAVE_COMPLEX_H */
-#else /* HAVE_FFTW3 */
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+
+#elif defined HAVE_ACCELERATE // using ACCELERATE
   // convert real data to even/odd format used in vDSP
   aubio_vDSP_ctoz((aubio_DSPComplex*)s->in, 2, &s->spec, 1, s->fft_size/2);
@@ -282,4 +361,27 @@
   smpl_t scale = 1./2.;
   aubio_vDSP_vsmul(compspec->data, 1, &scale, compspec->data, 1, s->fft_size);
+
+#elif defined HAVE_INTEL_IPP  // using Intel IPP
+
+  // 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
+  // convert complex buffer to [ r0, r1, ..., rN, iN-1, .., i2, i1]
+  compspec->data[0] = s->complexOut[0].re;
+  compspec->data[s->fft_size / 2] = s->complexOut[s->fft_size / 2].re;
+  for (i = 1; i < s->fft_size / 2; i++) {
+    compspec->data[i] = s->complexOut[i].re;
+    compspec->data[s->fft_size - i] = s->complexOut[i].im;
+  }
+  // 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
+
 #else                         // using OOURA
   aubio_ooura_rdft(s->winsize, 1, s->in, s->ip, s->w);
@@ -290,6 +392,5 @@
     compspec->data[s->winsize - i] = - s->in[2 * i + 1];
   }
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
+#endif /* using OOURA */
 }
 
@@ -314,6 +415,6 @@
     output->data[i] = s->out[i]*renorm;
   }
-#else /* HAVE_FFTW3 */
-#ifdef HAVE_ACCELERATE        // using ACCELERATE
+
+#elif defined HAVE_ACCELERATE // using ACCELERATE
   // convert from real imag  [ r0, r1, ..., rN, iN-1, .., i2, i1]
   // to vDSP packed format   [ r0, rN, r1, i1, ..., rN-1, iN-1 ]
@@ -333,6 +434,30 @@
   smpl_t scale = 1.0 / s->winsize;
   aubio_vDSP_vsmul(output->data, 1, &scale, output->data, 1, s->fft_size);
+
+#elif defined HAVE_INTEL_IPP  // using Intel IPP
+
+  // convert from real imag  [ r0, 0, ..., rN, iN-1, .., i2, i1, iN-1] to complex format
+  s->complexOut[0].re = compspec->data[0];
+  s->complexOut[0].im = 0;
+  s->complexOut[s->fft_size / 2].re = compspec->data[s->fft_size / 2];
+  s->complexOut[s->fft_size / 2].im = 0.0;
+  for (i = 1; i < s->fft_size / 2; i++) {
+    s->complexOut[i].re = compspec->data[i];
+    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);
+  // apply scaling
+  ippsMulC_64f(output->data, 1.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, 1.0f / s->winsize, output->data, s->fft_size);
+#endif /* HAVE_AUBIO_DOUBLE */
+
 #else                         // using OOURA
-  smpl_t scale = 2.0 / s->winsize;
+  smpl_t scale = 1.0 / s->winsize;
   s->out[0] = compspec->data[0];
   s->out[1] = compspec->data[s->winsize / 2];
@@ -345,19 +470,42 @@
     output->data[i] = s->out[i] * scale;
   }
-#endif /* HAVE_ACCELERATE */
-#endif /* HAVE_FFTW3 */
-}
-
-void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum) {
-  aubio_fft_get_phas(compspec, spectrum);
-  aubio_fft_get_norm(compspec, spectrum);
-}
-
-void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec) {
-  aubio_fft_get_imag(spectrum, compspec);
-  aubio_fft_get_real(spectrum, compspec);
-}
-
-void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum) {
+#endif
+}
+
+void aubio_fft_get_spectrum(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
+  aubio_fft_get_phas(s, compspec, spectrum);
+  aubio_fft_get_norm(s, compspec, spectrum);
+}
+
+void aubio_fft_get_realimag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
+  aubio_fft_get_imag(s, spectrum, compspec);
+  aubio_fft_get_real(s, spectrum, compspec);
+}
+
+void aubio_fft_get_phas(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
+
+#ifdef INTEL_IPP_FFT // using Intel IPP FFT
+  uint_t i;
+  
+  // convert from real imag  [ r0, 0, ..., rN, iN-1, .., i2, i1, iN-1] to complex format
+  s->complexOut[0].re = compspec->data[0];
+  s->complexOut[0].im = 0;
+  s->complexOut[s->fft_size / 2].re = compspec->data[s->fft_size / 2];
+  s->complexOut[s->fft_size / 2].im = 0.0;
+  for (i = 1; i < spectrum->length - 1; i++) {
+    s->complexOut[i].re = compspec->data[i];
+    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
+  if (status != ippStsNoErr) {
+    AUBIO_ERR("fft: failed to extract phase from fft. IPP error: %d\n", status);
+  }
+
+#else                 // NOT using Intel IPP
   uint_t i;
   if (compspec->data[0] < 0) {
@@ -375,7 +523,8 @@
     spectrum->phas[spectrum->length - 1] = 0.;
   }
-}
-
-void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum) {
+#endif
+}
+
+void aubio_fft_get_norm(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
   uint_t i = 0;
   spectrum->norm[0] = ABS(compspec->data[0]);
@@ -388,5 +537,5 @@
 }
 
-void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_imag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 1; i < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; i++) {
@@ -396,5 +545,5 @@
 }
 
-void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_real(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 0; i < compspec->length / 2 + 1; i++) {
Index: src/spectral/fft.h
===================================================================
--- src/spectral/fft.h	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ src/spectral/fft.h	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -99,5 +99,5 @@
 
 */
-void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_spectrum(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
 /** convert real/imag spectrum to norm/phas spectrum
 
@@ -106,5 +106,5 @@
 
 */
-void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_realimag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute phas spectrum from real/imag parts
@@ -114,5 +114,5 @@
 
 */
-void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_phas(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
 /** compute imaginary part from the norm/phas cvec
 
@@ -121,5 +121,5 @@
 
 */
-void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_imag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute norm component from real/imag parts
@@ -129,5 +129,5 @@
 
 */
-void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_norm(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
 /** compute real part from norm/phas components
 
@@ -136,5 +136,5 @@
 
 */
-void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_real(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
 
 #ifdef __cplusplus
Index: tests/src/io/test-sink-multi.c
===================================================================
--- tests/src/io/test-sink-multi.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink-multi.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -70,4 +72,7 @@
   del_aubio_source(i);
 beach_source:
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink.c
===================================================================
--- tests/src/io/test-sink.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -55,4 +57,7 @@
   del_fvec(vec);
 beach_fvec:
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_apple_audio-multi.c
===================================================================
--- tests/src/io/test-sink_apple_audio-multi.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_apple_audio-multi.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -75,4 +77,7 @@
   PRINT_ERR("aubio was not compiled with aubio_sink_apple_audio\n");
 #endif /* HAVE_SINK_APPLE_AUDIO */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_apple_audio.c
===================================================================
--- tests/src/io/test-sink_apple_audio.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_apple_audio.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -64,4 +66,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n");
 #endif /* HAVE_SINK_APPLE_AUDIO */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_sndfile-multi.c
===================================================================
--- tests/src/io/test-sink_sndfile-multi.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_sndfile-multi.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -75,4 +77,7 @@
   PRINT_ERR("aubio was not compiled with aubio_sink_sndfile\n");
 #endif /* HAVE_SNDFILE */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_sndfile.c
===================================================================
--- tests/src/io/test-sink_sndfile.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_sndfile.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -64,4 +66,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n");
 #endif /* HAVE_SNDFILE */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_wavwrite-multi.c
===================================================================
--- tests/src/io/test-sink_wavwrite-multi.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_wavwrite-multi.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -75,4 +77,7 @@
   PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n");
 #endif /* HAVE_WAVWRITE */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-sink_wavwrite.c
===================================================================
--- tests/src/io/test-sink_wavwrite.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-sink_wavwrite.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -64,4 +66,7 @@
   PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n");
 #endif /* HAVE_WAVWRITE */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source.c
===================================================================
--- tests/src/io/test-source.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -56,4 +58,5 @@
   del_aubio_source (s);
 beach:
+  aubio_cleanup();
   return err;
 }
Index: tests/src/io/test-source_apple_audio.c
===================================================================
--- tests/src/io/test-source_apple_audio.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_apple_audio.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -60,4 +62,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n");
 #endif /* HAVE_SOURCE_APPLE_AUDIO */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source_avcodec.c
===================================================================
--- tests/src/io/test-source_avcodec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_avcodec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -60,4 +62,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n");
 #endif /* HAVE_LIBAV */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source_multi.c
===================================================================
--- tests/src/io/test-source_multi.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_multi.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
   if (argc < 2) {
@@ -54,4 +56,6 @@
 beach:
 
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source_seek.c
===================================================================
--- tests/src/io/test-source_seek.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_seek.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -89,4 +91,7 @@
   // check that we got about half the frames, with 3 decimals
   assert ( roundf(1.e3 * old_n_frames_1 / old_n_frames_3) / 1.e3 == 2.);
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source_sndfile.c
===================================================================
--- tests/src/io/test-source_sndfile.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_sndfile.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -60,4 +62,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n");
 #endif /* HAVE_SNDFILE */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/io/test-source_wavread.c
===================================================================
--- tests/src/io/test-source_wavread.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/io/test-source_wavread.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   uint_t err = 0;
   if (argc < 2) {
@@ -61,4 +63,7 @@
   PRINT_ERR("aubio was not compiled with aubio_source_wavread\n");
 #endif /* HAVE_WAVREAD */
+
+  aubio_cleanup();
+  
   return err;
 }
Index: tests/src/onset/test-onset.c
===================================================================
--- tests/src/onset/test-onset.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/onset/test-onset.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+  
   uint_t err = 0;
   if (argc < 2) {
Index: tests/src/pitch/test-pitch.c
===================================================================
--- tests/src/pitch/test-pitch.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitch.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   // 1. allocate some memory
   uint_t n = 0; // frame counter
Index: tests/src/pitch/test-pitchfcomb.c
===================================================================
--- tests/src/pitch/test-pitchfcomb.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchfcomb.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,5 @@
 int main (void)
 {
+  aubio_init();
   uint_t i = 0;
   uint_t win_s = 1024; // window size
Index: tests/src/pitch/test-pitchmcomb.c
===================================================================
--- tests/src/pitch/test-pitchmcomb.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchmcomb.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/pitch/test-pitchschmitt.c
===================================================================
--- tests/src/pitch/test-pitchschmitt.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchschmitt.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,5 @@
 int main (void)
 {
+  aubio_init();
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/pitch/test-pitchspecacf.c
===================================================================
--- tests/src/pitch/test-pitchspecacf.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchspecacf.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/pitch/test-pitchyin.c
===================================================================
--- tests/src/pitch/test-pitchyin.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchyin.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/pitch/test-pitchyinfft.c
===================================================================
--- tests/src/pitch/test-pitchyinfft.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/pitch/test-pitchyinfft.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -8,4 +8,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/spectral/test-awhitening.c
===================================================================
--- tests/src/spectral/test-awhitening.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-awhitening.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+
   sint_t err = 0;
 
@@ -80,4 +82,5 @@
   del_fvec(vec);
 beach_fvec:
+  aubio_cleanup();
   return err;
 }
Index: tests/src/spectral/test-fft.c
===================================================================
--- tests/src/spectral/test-fft.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-fft.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   int return_code = 0;
   uint_t i, n_iters = 100; // number of iterations
@@ -44,5 +46,7 @@
   del_cvec(fftgrain);
   del_fvec(out);
+
   aubio_cleanup();
+  
   return return_code;
 }
Index: tests/src/spectral/test-filterbank.c
===================================================================
--- tests/src/spectral/test-filterbank.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-filterbank.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t win_s = 1024; // window size
   uint_t n_filters = 13; // number of filters
@@ -34,4 +36,5 @@
   del_cvec (in_spec);
   del_fvec (out_filters);
+  
   aubio_cleanup ();
 
Index: tests/src/spectral/test-filterbank_mel.c
===================================================================
--- tests/src/spectral/test-filterbank_mel.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-filterbank_mel.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t samplerate = 16000; // samplerate of signal to filter
   uint_t win_s = 512; // fft size
@@ -33,4 +35,5 @@
   del_cvec (in_spec);
   del_fvec (out_filters);
+  
   aubio_cleanup ();
 
Index: tests/src/spectral/test-mfcc.c
===================================================================
--- tests/src/spectral/test-mfcc.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-mfcc.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t win_s = 512; // fft size
   uint_t n_filters = 40; // number of filters
@@ -25,4 +27,5 @@
   del_cvec (in);
   del_fvec (out);
+  
   aubio_cleanup ();
 
Index: tests/src/spectral/test-phasevoc.c
===================================================================
--- tests/src/spectral/test-phasevoc.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-phasevoc.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 6; // compute n times
   uint_t win_s = 32; // window size
@@ -42,4 +44,5 @@
   del_fvec(out);
   del_aubio_pvoc(pv);
+  
   aubio_cleanup();
 
Index: tests/src/spectral/test-specdesc.c
===================================================================
--- tests/src/spectral/test-specdesc.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-specdesc.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t win_s = 1024; // window size
   cvec_t *in = new_cvec (win_s); // input buffer
@@ -39,4 +41,5 @@
   del_cvec (in);
   del_fvec (out);
+  
   aubio_cleanup ();
 
Index: tests/src/spectral/test-tss.c
===================================================================
--- tests/src/spectral/test-tss.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/spectral/test-tss.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t n = 10; // compute n times
   uint_t win_s = 1024; // window size
Index: tests/src/synth/test-sampler.c
===================================================================
--- tests/src/synth/test-sampler.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/synth/test-sampler.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+  
   sint_t err = 0;
 
@@ -54,4 +56,5 @@
   del_aubio_sink(sink);
   del_fvec(vec);
+  
   aubio_cleanup();
 
Index: tests/src/synth/test-wavetable.c
===================================================================
--- tests/src/synth/test-wavetable.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/synth/test-wavetable.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+  
   sint_t err = 0;
 
@@ -63,4 +65,5 @@
   del_aubio_sink(sink);
   del_fvec(vec);
+  
   aubio_cleanup();
 
Index: tests/src/tempo/test-beattracking.c
===================================================================
--- tests/src/tempo/test-beattracking.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/tempo/test-beattracking.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -6,4 +6,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t i = 0;
   uint_t win_s = 1024; // window size
@@ -34,4 +36,5 @@
   del_fvec(in);
   del_fvec(out);
+  
   aubio_cleanup();
 
Index: tests/src/tempo/test-tempo.c
===================================================================
--- tests/src/tempo/test-tempo.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/tempo/test-tempo.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (int argc, char **argv)
 {
+  aubio_init();
+  
   uint_t err = 0;
   if (argc < 2) {
@@ -57,4 +59,5 @@
   del_fvec(out);
   del_aubio_source(source);
+  
 beach:
   aubio_cleanup();
Index: tests/src/temporal/test-a_weighting.c
===================================================================
--- tests/src/temporal/test-a_weighting.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/temporal/test-a_weighting.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,5 +3,6 @@
 int main (void)
 {
-  
+  aubio_init();
+
   aubio_filter_t * f;
 
@@ -39,4 +40,6 @@
   del_aubio_filter (f);
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/temporal/test-biquad.c
===================================================================
--- tests/src/temporal/test-biquad.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/temporal/test-biquad.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t win_s = 64; // window size
 
@@ -29,4 +31,6 @@
   del_fvec(out_vec);
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/temporal/test-c_weighting.c
===================================================================
--- tests/src/temporal/test-c_weighting.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/temporal/test-c_weighting.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+
   aubio_filter_t * f;
 
@@ -38,4 +40,6 @@
   del_aubio_filter (f);
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/temporal/test-filter.c
===================================================================
--- tests/src/temporal/test-filter.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/temporal/test-filter.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+  
   uint_t win_s = 16; // window size
   uint_t impulse_at = win_s / 2;
@@ -30,4 +32,5 @@
   del_fvec (out);
   del_aubio_filter (o);
+  
   aubio_cleanup ();
 
Index: tests/src/temporal/test-resampler.c
===================================================================
--- tests/src/temporal/test-resampler.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/temporal/test-resampler.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -3,4 +3,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t win_s = 1024; // window size
   smpl_t ratio = 0.5;
@@ -19,4 +21,6 @@
   del_fvec (out);
 
+  aubio_cleanup();
+
   return 0;
 }
Index: tests/src/test-cvec.c
===================================================================
--- tests/src/test-cvec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-cvec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t i, window_size = 16; // window size
   cvec_t * complex_vector = new_cvec (window_size); // input buffer
@@ -45,4 +47,7 @@
   // destroy it
   del_cvec(complex_vector);
+
+  aubio_cleanup();
+
   return 0;
 }
Index: tests/src/test-delnull.c
===================================================================
--- tests/src/test-delnull.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-delnull.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -7,4 +7,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t return_code = 0;
   fvec_t *f = new_fvec(-12);
@@ -21,4 +23,7 @@
     return_code = 3;
   }
+
+  aubio_cleanup();
+  
   return return_code;
 }
Index: tests/src/test-fmat.c
===================================================================
--- tests/src/test-fmat.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-fmat.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -7,4 +7,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t height = 3, length = 9, i, j;
   // create fmat_t object
@@ -26,4 +28,7 @@
   // destroy it
   del_fmat(mat);
+
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/test-fvec.c
===================================================================
--- tests/src/test-fvec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-fvec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t vec_size = 10, i;
   fvec_t * vec = new_fvec (vec_size);
@@ -39,4 +41,6 @@
   del_fvec(vec);
 
+  aubio_cleanup();
+
   return 0;
 }
Index: tests/src/test-lvec.c
===================================================================
--- tests/src/test-lvec.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-lvec.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t win_s = 32; // window size
   lvec_t * sp = new_lvec (win_s); // input buffer
@@ -14,4 +16,7 @@
   lvec_print (sp);
   del_lvec(sp);
+
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/test-mathutils-window.c
===================================================================
--- tests/src/test-mathutils-window.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-mathutils-window.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -4,4 +4,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t length = 0;
   uint_t n_length = 4, n_types = 10, i, t;
@@ -27,4 +29,7 @@
     }
   }
+
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/test-mathutils.c
===================================================================
--- tests/src/test-mathutils.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/test-mathutils.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -114,7 +114,12 @@
 int main (void)
 {
+  aubio_init();
+
   test_next_power_of_two();
   test_miditofreq();
   test_freqtomidi();
+
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/utils/test-hist.c
===================================================================
--- tests/src/utils/test-hist.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/utils/test-hist.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -5,4 +5,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t length;
   for (length = 1; length < 10; length ++ ) {
@@ -26,4 +28,7 @@
     del_fvec(t);
   }
+
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/utils/test-log.c
===================================================================
--- tests/src/utils/test-log.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/utils/test-log.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -24,4 +24,6 @@
 int main (void)
 {
+  aubio_init();
+
   fprintf(stdout, "### testing normal logging\n");
   AUBIO_ERR("testing normal AUBIO_LOG_ERR\n");
@@ -57,4 +59,6 @@
   AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n");
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/utils/test-parameter.c
===================================================================
--- tests/src/utils/test-parameter.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/utils/test-parameter.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -25,4 +25,6 @@
 int main (void)
 {
+  aubio_init();
+
   smpl_t max_value = 100.;
   smpl_t min_value = 0.;
@@ -67,4 +69,6 @@
   del_aubio_parameter (param);
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: tests/src/utils/test-scale.c
===================================================================
--- tests/src/utils/test-scale.c	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ tests/src/utils/test-scale.c	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -5,4 +5,6 @@
 int main (void)
 {
+  aubio_init();
+
   uint_t n = 0;
   uint_t win_s = 1024; // window size
@@ -19,4 +21,6 @@
   del_fvec(in);
 
+  aubio_cleanup();
+  
   return 0;
 }
Index: wscript
===================================================================
--- wscript	(revision 34ce71592c6e2fe68e981bbf08b7a9f1292ce300)
+++ wscript	(revision 986131d13a247a071d4450fd0411aa43a9e67141)
@@ -51,4 +51,7 @@
             help_str = 'compile with fftw3 instead of ooura',
             help_disable_str = 'do not compile with fftw3')
+    add_option_enable_disable(ctx, 'intelipp', default = None,
+            help_str = 'use Intel IPP libraries (auto)',
+            help_disable_str = 'do not use Intel IPP libraries')
     add_option_enable_disable(ctx, 'complex', default = False,
             help_str ='compile with C99 complex',
@@ -156,4 +159,8 @@
         # configure warnings
         ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS']
+        # ignore "possible loss of data" warnings
+        ctx.env.CFLAGS += ['/wd4305', '/wd4244', '/wd4245', '/wd4267']
+        # ignore "unreferenced formal parameter" warnings
+        ctx.env.CFLAGS += ['/wd4100']
         # set optimization level and runtime libs
         if (ctx.options.build_type == "release"):
@@ -286,5 +293,17 @@
     else:
         ctx.msg('Checking if complex.h is enabled', 'no')
-
+    
+    # check for Intel IPP
+    if (ctx.options.enable_intelipp != False):
+        if (ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'], mandatory = False) and
+            ctx.check(lib=['ippcore', 'ippvm', 'ipps'], uselib_store='INTEL_IPP', mandatory = False)):
+            ctx.msg('Checking if Intel IPP is available', 'yes')
+            ctx.define('HAVE_INTEL_IPP', 1)
+            if ctx.env.CC_NAME == 'msvc':
+                # force linking multi-threaded static IPP libraries on Windows with msvc
+                ctx.define('_IPP_SEQUENTIAL_STATIC', 1)
+        else:
+            ctx.msg('Checking if Intel IPP is available', 'no')
+    
     # check for fftw3
     if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False):
@@ -310,5 +329,5 @@
         ctx.define('HAVE_FFTW3', 1)
 
-    # fftw not enabled, use vDSP or ooura
+    # fftw not enabled, use vDSP, intelIPP or ooura
     if 'HAVE_FFTW3F' in ctx.env.define_key:
         ctx.msg('Checking for FFT implementation', 'fftw3f')
@@ -317,4 +336,6 @@
     elif 'HAVE_ACCELERATE' in ctx.env.define_key:
         ctx.msg('Checking for FFT implementation', 'vDSP')
+    elif 'HAVE_INTEL_IPP' in ctx.env.define_key:
+        ctx.msg('Checking for FFT implementation', 'Intel IPP')
     else:
         ctx.msg('Checking for FFT implementation', 'ooura')
