📄 fourier.h
字号:
/*============================================================================
fourier.h - Don Cross <dcross@intersrv.com>
http://www.intersrv.com/~dcross/fft.html
Contains definitions for doing Fourier transforms
and inverse Fourier transforms.
============================================================================
Modifications by Murphy McCauley --
07/29/99 Windows-oriented changes for FFT DLL
============================================================================*/
/*
** fft() computes the Fourier transform or inverse transform
** of the complex inputs to produce the complex outputs.
** The number of samples must be a power of two to do the
** recursive decomposition of the FFT algorithm.
** See Chapter 12 of "Numerical Recipes in FORTRAN" by
** Press, Teukolsky, Vetterling, and Flannery,
** Cambridge University Press.
**
** Notes: If you pass ImaginaryIn = NULL, this function will "pretend"
** that it is an array of all zeroes. This is convenient for
** transforming digital samples of real number data without
** wasting memory.
*/
#include <windows.h>
void WINAPI fft_double (
unsigned NumSamples, /* must be a power of 2 */
int InverseTransform, /* 0=forward FFT, 1=inverse FFT */
double *RealIn, /* array of input's real samples */
double *ImagIn, /* array of input's imag samples */
double *RealOut, /* array of output's reals */
double *ImagOut ); /* array of output's imaginaries */
void WINAPI fft_float (
unsigned NumSamples, /* must be a power of 2 */
int InverseTransform, /* 0=forward FFT, 1=inverse FFT */
float *RealIn, /* array of input's real samples */
float *ImaginaryIn, /* array of input's imag samples */
float *RealOut, /* array of output's reals */
float *ImaginaryOut ); /* array of output's imaginaries */
int IsPowerOfTwo ( unsigned x );
unsigned NumberOfBitsNeeded ( unsigned PowerOfTwo );
unsigned ReverseBits ( unsigned index, unsigned NumBits );
/*
** The following function returns an "abstract frequency" of a
** given index into a buffer with a given number of frequency samples.
** Multiply return value by sampling rate to get frequency expressed in Hz.
*/
double WINAPI Index_to_frequency ( unsigned NumSamples, unsigned Index );
/*--- end of file fourier.h ---*/
#define DDC_PI (3.14159265358979323846)
void OKBox(char* TheText, char* Title);
char tempstr[512];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -