2010-01-23 19:44:49 +00:00
|
|
|
#ifndef __realfftf_h
|
|
|
|
#define __realfftf_h
|
|
|
|
|
2021-05-09 15:16:56 +00:00
|
|
|
|
2018-11-11 02:40:37 +00:00
|
|
|
|
2020-06-19 19:43:09 +00:00
|
|
|
|
2018-11-11 17:27:44 +00:00
|
|
|
|
2016-08-13 15:02:35 +00:00
|
|
|
#include "MemoryX.h"
|
2015-08-31 21:53:12 +00:00
|
|
|
|
2016-08-13 15:02:35 +00:00
|
|
|
using fft_type = float;
|
2015-06-04 14:40:21 +00:00
|
|
|
struct FFTParam {
|
2016-08-13 15:02:35 +00:00
|
|
|
ArrayOf<int> BitReversed;
|
|
|
|
ArrayOf<fft_type> SinTable;
|
2016-09-08 18:28:34 +00:00
|
|
|
size_t Points;
|
2014-01-16 17:55:35 +00:00
|
|
|
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
|
|
|
int pow2Bits;
|
|
|
|
#endif
|
2015-06-04 14:40:21 +00:00
|
|
|
};
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2020-09-28 12:50:18 +00:00
|
|
|
struct AUDACITY_DLL_API FFTDeleter{
|
2016-08-13 15:02:35 +00:00
|
|
|
void operator () (FFTParam *p) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
using HFFT = std::unique_ptr<
|
|
|
|
FFTParam, FFTDeleter
|
|
|
|
>;
|
|
|
|
|
2020-09-28 12:50:18 +00:00
|
|
|
AUDACITY_DLL_API HFFT GetFFT(size_t);
|
|
|
|
AUDACITY_DLL_API void RealFFTf(fft_type *, const FFTParam *);
|
|
|
|
AUDACITY_DLL_API void InverseRealFFTf(fft_type *, const FFTParam *);
|
|
|
|
AUDACITY_DLL_API void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut);
|
|
|
|
AUDACITY_DLL_API void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer,
|
2016-06-25 18:36:00 +00:00
|
|
|
fft_type *RealOut, fft_type *ImagOut);
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|