aboutsummaryrefslogtreecommitdiffstats
path: root/openFrameworks
diff options
context:
space:
mode:
Diffstat (limited to 'openFrameworks')
-rw-r--r--openFrameworks/ofxMaxim/libs/fft.cpp9
-rw-r--r--openFrameworks/ofxMaxim/libs/maxiFFT.h4
-rw-r--r--openFrameworks/openFrameworksExamples/OSX/OF_0.9.0_OSX_XCode7_mySketch_maxim/src/ofApp.cpp3
3 files changed, 9 insertions, 7 deletions
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
diff --git a/openFrameworks/openFrameworksExamples/OSX/OF_0.9.0_OSX_XCode7_mySketch_maxim/src/ofApp.cpp b/openFrameworks/openFrameworksExamples/OSX/OF_0.9.0_OSX_XCode7_mySketch_maxim/src/ofApp.cpp
index b3607f3..ef25823 100644
--- a/openFrameworks/openFrameworksExamples/OSX/OF_0.9.0_OSX_XCode7_mySketch_maxim/src/ofApp.cpp
+++ b/openFrameworks/openFrameworksExamples/OSX/OF_0.9.0_OSX_XCode7_mySketch_maxim/src/ofApp.cpp
@@ -57,7 +57,7 @@ void ofApp::draw(){
//--------------------------------------------------------------
void ofApp::audioOut(float * output, int bufferSize, int nChannels) {
-
+
for (int i = 0; i < bufferSize; i++){
@@ -73,7 +73,6 @@ void ofApp::audioOut(float * output, int bufferSize, int nChannels) {
//make 'wave' equal something noisy
- double wave = mySample.play(0.5);
output[i*nChannels ] = wave; /* You may end up with lots of outputs. add them here */