www.pudn.com > AudioWave.rar > FFT.h


// FFT.h: interface for the CFFT class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_FFT_H__1472CC02_8CA0_11D3_AD15_5254ABDDD71D__INCLUDED_) 
#define AFX_FFT_H__1472CC02_8CA0_11D3_AD15_5254ABDDD71D__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
//¸´Êý¶¨Òå 
typedef struct  
{ 
	double re; 
	double im; 
}COMPLEX; 
 
class CFFT   
{ 
public: 
	void FFTSignal( 
         int       nPower,          // must be a power of 2  
         double    *RealIn,              // array of input's real samples  
         double    *ImaginaryIn,         // array of input's imag samples  
	     double    *RealOut,             // array of output's reals  
         double    *ImaginaryOut         // array of output's imaginaries  
		); 
	void IFFTSignal( 
		int       nPower,          // must be a power of 2  
		double    *RealIn,              // array of input's real samples  
		double    *ImaginaryIn,         // array of input's imag samples  
		double    *RealOut,             // array of output's reals  
		double    *ImaginaryOut         // array of output's imaginaries  
		); 
 
	CFFT(); 
	virtual ~CFFT(); 
private: 
 	void FFT(COMPLEX *TD,COMPLEX *FD,int power); 
	void IFFT(COMPLEX *FD,COMPLEX *TD,int power); 
}; 
 
#endif // !defined(AFX_FFT_H__1472CC02_8CA0_11D3_AD15_5254ABDDD71D__INCLUDED_)