FFT.h
资源名称:AudioWave.rar [点击查看]
上传用户:huifengb
上传日期:2007-12-27
资源大小:334k
文件大小:1k
源码类别:
多媒体
开发平台:
Visual C++
- // 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_)