Mercurial > hg > qm-dsp
diff dsp/phasevocoder/PhaseVocoder.h @ 289:befe5aa6b450
* Refactor FFT a little bit so as to separate construction and processing
rather than have a single static method -- will make it easier to use a
different implementation
* pull in KissFFT implementation (not hooked up yet)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 13 May 2009 09:19:12 +0000 |
parents | 9c403afdd9e9 |
children | e5907ae6de17 |
line wrap: on
line diff
--- a/dsp/phasevocoder/PhaseVocoder.h Tue May 12 21:04:25 2009 +0000 +++ b/dsp/phasevocoder/PhaseVocoder.h Wed May 13 09:19:12 2009 +0000 @@ -11,23 +11,26 @@ #ifndef PHASEVOCODER_H #define PHASEVOCODER_H +class FFTReal; class PhaseVocoder { public: - PhaseVocoder(); + PhaseVocoder( unsigned int size ); virtual ~PhaseVocoder(); - void process( unsigned int size, double* src, double* mag, double* theta); + void process( double* src, double* mag, double* theta); protected: void getPhase(unsigned int size, double *theta, double *real, double *imag); - void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut); +// void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut); void getMagnitude( unsigned int size, double* mag, double* real, double* imag); void FFTShift( unsigned int size, double* src); - double* imagOut; - double* realOut; + unsigned int m_n; + FFTReal *m_fft; + double *m_imagOut; + double *m_realOut; };