forked from Sneeds-Feed-and-Seed/sneedacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRealFFTf.h
36 lines (25 loc) · 810 Bytes
/
RealFFTf.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
#ifndef __realfftf_h
#define __realfftf_h
#include "MemoryX.h"
using fft_type = float;
struct FFTParam {
ArrayOf<int> BitReversed;
ArrayOf<fft_type> SinTable;
size_t Points;
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
int pow2Bits;
#endif
};
struct SNEEDACITY_DLL_API FFTDeleter{
void operator () (FFTParam *p) const;
};
using HFFT = std::unique_ptr<
FFTParam, FFTDeleter
>;
SNEEDACITY_DLL_API HFFT GetFFT(size_t);
SNEEDACITY_DLL_API void RealFFTf(fft_type *, const FFTParam *);
SNEEDACITY_DLL_API void InverseRealFFTf(fft_type *, const FFTParam *);
SNEEDACITY_DLL_API void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut);
SNEEDACITY_DLL_API void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer,
fft_type *RealOut, fft_type *ImagOut);
#endif