diff options
| author | Tim Redfern <tim@eclectronics.org> | 2011-12-20 14:32:48 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2011-12-20 14:32:48 +0000 |
| commit | 643442a18323f563f75c20f32ef3488f68b74570 (patch) | |
| tree | c3af777762e2b161bd9b58444e4661fac298c49a /src/fft.h | |
initial show version
Diffstat (limited to 'src/fft.h')
| -rw-r--r-- | src/fft.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/fft.h b/src/fft.h new file mode 100644 index 0000000..bae5b37 --- /dev/null +++ b/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 |
