summaryrefslogtreecommitdiff
path: root/06_performance/src/fft.h
diff options
context:
space:
mode:
Diffstat (limited to '06_performance/src/fft.h')
-rw-r--r--06_performance/src/fft.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/06_performance/src/fft.h b/06_performance/src/fft.h
new file mode 100644
index 0000000..bae5b37
--- /dev/null
+++ b/06_performance/src/fft.h
@@ -0,0 +1,33 @@
+
+#ifndef _FFT
+#define _FFT
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846 /* pi */
+#endif
+
+
+class fft {
+
+ public:
+
+ fft();
+ ~fft();
+
+ /* Calculate the power spectrum */
+ void powerSpectrum(int start, int half, float *data, int windowSize,float *magnitude,float *phase, float *power, float *avg_power);
+ /* ... the inverse */
+ void inversePowerSpectrum(int start, int half, int windowSize, float *finalOut,float *magnitude,float *phase);
+
+ void processLogXScale(const float * data,unsigned int insize, double fMax,
+ float * avout, float * pkout, unsigned int outsize,
+ float f1, float f2);
+
+
+ float avout[15];
+ float pkout[15];
+
+};
+
+
+#endif