-
Notifications
You must be signed in to change notification settings - Fork 3
/
Fourier.h
executable file
·47 lines (31 loc) · 1.25 KB
/
Fourier.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Fourier.h: interface for the Fourier class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FOURIER_H__6939C9A4_8D93_41A3_9521_3B863957EB8E__INCLUDED_)
#define AFX_FOURIER_H__6939C9A4_8D93_41A3_9521_3B863957EB8E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/*
* fft.h
*
* loic fonteneau 15-feb-2001
* Perform discrete FFT
*
* Original code : Don Cross <[email protected]>
* http://www.intersrv.com/~dcross/fft.html
*
*/
///////////////////////////
// function prototypes //
///////////////////////////
void fft_double(unsigned int p_nSamples, bool p_bInverseTransform, double *p_lpRealIn, double *p_lpImagIn, double *p_lpRealOut, double *p_lpImagOut);
bool IsPowerOfTwo(unsigned int p_nX);
unsigned int NumberOfBitsNeeded(unsigned int p_nSamples);
unsigned int ReverseBits(unsigned int p_nIndex, unsigned int p_nBits);
double Index_to_frequency(unsigned int p_nBaseFreq, unsigned int p_nSamples, unsigned int p_nIndex);
/////////////////////////////
// constantes-definition //
/////////////////////////////
#define PI (3.14159265358979323846)
#endif // !defined(AFX_FOURIER_H__6939C9A4_8D93_41A3_9521_3B863957EB8E__INCLUDED_)