没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include "StdAfx.h"
#include ".\waveconvertor.h"
//////////////////////////////////////////////////////////////////////////
// class CWaveConvertor
//
// 功能: 实现裸音频数据的FFT变换
// 创建人: 陈文凯 (chwkai@gmail.com)
// 创建日期:2005年5月19日
// 修改人:
// 修改日期:
// 版本
/* Pjotr '87. */
// As best as I can determine this is in the public domain. No license was found
// withit what so ever. The author is listed as:
// Peter Valkenburg (valke@cs.vu.nl).
//
// If there is some disagreement then contact Bruce Forsberg (forsberg@tns.net)
#include <math.h>
#define pi 3.1415926535897932384626434
#define c_re(c) ((c).re)
#define c_im(c) ((c).im)
/* C_add_mul adds product of c1 and c2 to c. */
#define c_add_mul(c, c1, c2) { COMPLEX C1, C2; C1 = (c1); C2 = (c2); \
c_re (c) += C1.re * C2.re - C1.im * C2.im; \
c_im (c) += C1.re * C2.im + C1.im * C2.re; }
#include ".\waveconvertor.h"
//////////////////////////////////////////////////////////////////////////
// class CWaveConvertor
//
// 功能: 实现裸音频数据的FFT变换
// 创建人: 陈文凯 (chwkai@gmail.com)
// 创建日期:2005年5月19日
// 修改人:
// 修改日期:
// 版本
/* Pjotr '87. */
// As best as I can determine this is in the public domain. No license was found
// withit what so ever. The author is listed as:
// Peter Valkenburg (valke@cs.vu.nl).
//
// If there is some disagreement then contact Bruce Forsberg (forsberg@tns.net)
#include <math.h>
#define pi 3.1415926535897932384626434
#define c_re(c) ((c).re)
#define c_im(c) ((c).im)
/* C_add_mul adds product of c1 and c2 to c. */
#define c_add_mul(c, c1, c2) { COMPLEX C1, C2; C1 = (c1); C2 = (c2); \
c_re (c) += C1.re * C2.re - C1.im * C2.im; \
c_im (c) += C1.re * C2.im + C1.im * C2.re; }
/* C_conj substitutes c by its complex conjugate. */
#define c_conj(c) { c_im (c) = -c_im (c); }
/* C_realdiv divides complex c by real. */
#define c_realdiv(c, real) { c_re (c) /= (real); c_im (c) /= (real); }
/*
* W gives the (already computed) Wn ^ k (= e ^ (2pi * i * k / n)).
* Notice that the powerseries of Wn has period Nfactors.
*/
#define W(n, k) (W_factors [((k) * (Nfactors / (n))) % Nfactors])
/*! \brief Constructor.
*/
aflibFFT::aflibFFT()
{
Nfactors = 0;
W_factors = NULL;
}
/*! \brief Destructor.
*/
aflibFFT::~aflibFFT()
{
if (W_factors != NULL)
delete W_factors;
剩余20页未读,继续阅读
资源评论
- WYL_LIVE2014-12-25资料还不错,对自己理解有一定的帮助
- 流年划破容颜882019-03-02代码好多错误,没法用,自定义的头文件又不在文档里
- jbeic2015-03-27不错 学习了 谢谢奉献
Franky1024
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功