comparison 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
comparison
equal deleted inserted replaced
288:86c70067c723 289:befe5aa6b450
9 */ 9 */
10 10
11 #ifndef PHASEVOCODER_H 11 #ifndef PHASEVOCODER_H
12 #define PHASEVOCODER_H 12 #define PHASEVOCODER_H
13 13
14 class FFTReal;
14 15
15 class PhaseVocoder 16 class PhaseVocoder
16 { 17 {
17 public: 18 public:
18 PhaseVocoder(); 19 PhaseVocoder( unsigned int size );
19 virtual ~PhaseVocoder(); 20 virtual ~PhaseVocoder();
20 21
21 void process( unsigned int size, double* src, double* mag, double* theta); 22 void process( double* src, double* mag, double* theta);
22 23
23 protected: 24 protected:
24 void getPhase(unsigned int size, double *theta, double *real, double *imag); 25 void getPhase(unsigned int size, double *theta, double *real, double *imag);
25 void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut); 26 // void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut);
26 void getMagnitude( unsigned int size, double* mag, double* real, double* imag); 27 void getMagnitude( unsigned int size, double* mag, double* real, double* imag);
27 void FFTShift( unsigned int size, double* src); 28 void FFTShift( unsigned int size, double* src);
28 29
29 double* imagOut; 30 unsigned int m_n;
30 double* realOut; 31 FFTReal *m_fft;
32 double *m_imagOut;
33 double *m_realOut;
31 34
32 }; 35 };
33 36
34 #endif 37 #endif