From d60b86693af086e820f2488a4f8db6fe96ed7ece Mon Sep 17 00:00:00 2001 From: mick grierson Date: Wed, 14 Dec 2016 02:30:34 +0000 Subject: refined old envelopes --- openFrameworks/ofxMaxim/libs/fft.cpp | 9 ++++++--- openFrameworks/ofxMaxim/libs/maxiFFT.h | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'openFrameworks/ofxMaxim/libs') diff --git a/openFrameworks/ofxMaxim/libs/fft.cpp b/openFrameworks/ofxMaxim/libs/fft.cpp index 85a7aa9..6e5e0de 100644 --- a/openFrameworks/ofxMaxim/libs/fft.cpp +++ b/openFrameworks/ofxMaxim/libs/fft.cpp @@ -544,9 +544,12 @@ void fft::inversePowerSpectrum(int start, float *finalOut, float *window, float } /* zero negative frequencies */ - memset(in_real+half, half, 0.0); - memset(in_img+half, half, 0.0); - +// memset(in_real+half, half, 0.0); +// memset(in_img+half, half, 0.0); + + memset(in_real+half, 0.0, sizeof(float) * half); + memset(in_img+half, 0.0, sizeof(float) * half); + FFT(n, 1, in_real, in_img, out_real, out_img); // second parameter indicates inverse transform for (i = 0; i < n; i++) { diff --git a/openFrameworks/ofxMaxim/libs/maxiFFT.h b/openFrameworks/ofxMaxim/libs/maxiFFT.h index d2694f4..53a75c5 100644 --- a/openFrameworks/ofxMaxim/libs/maxiFFT.h +++ b/openFrameworks/ofxMaxim/libs/maxiFFT.h @@ -33,7 +33,7 @@ #ifndef _MAXI_FFT #define _MAXI_FFT -//#define _NO_VDSP //set this if you don't want to use apple's vDSP fft functions +#define _NO_VDSP //set this if you don't want to use apple's vDSP fft functions #include "fft.h" @@ -125,4 +125,4 @@ public: }; -#endif \ No newline at end of file +#endif -- cgit v1.3