diff options
| author | Comment <tim@gray.(none)> | 2013-06-28 23:32:10 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-06-28 23:32:10 +0100 |
| commit | 1a7e15a63d78a6351028d977b90052f6b0d6bf7d (patch) | |
| tree | 8345507e9c4dd871cd08eb884fe8b9fe2816137d /07_performance/src/fft.h | |
| parent | fd8dc2aa23c4bbc297e835e4f920aaf5342aba5e (diff) | |
first performance version
Diffstat (limited to '07_performance/src/fft.h')
| -rw-r--r-- | 07_performance/src/fft.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/07_performance/src/fft.h b/07_performance/src/fft.h new file mode 100644 index 0000000..bae5b37 --- /dev/null +++ b/07_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 |
