diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-12 22:05:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-12 22:05:38 +0000 |
| commit | fbbc891991aaef716b7e56870faa25a11b169ef1 (patch) | |
| tree | 1cc49cca41a2a6f4b769d48eb3189d24410f9f04 /07_performance/src/fft.h | |
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 |
