mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
... note the swap of target_link_libraries lines in src/CMakeLists.txt, needed to build at least on macOS, becuase FFT.h must be looked up first in lib-math, not in lib-src/twolame Also making a dependency cycle of SampleFormat and Dither! But we will tolerate that within one small library.
33 lines
746 B
C++
33 lines
746 B
C++
#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 MATH_API FFTDeleter{
|
|
void operator () (FFTParam *p) const;
|
|
};
|
|
|
|
using HFFT = std::unique_ptr<
|
|
FFTParam, FFTDeleter
|
|
>;
|
|
|
|
MATH_API HFFT GetFFT(size_t);
|
|
MATH_API void RealFFTf(fft_type *, const FFTParam *);
|
|
MATH_API void InverseRealFFTf(fft_type *, const FFTParam *);
|
|
MATH_API void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut);
|
|
MATH_API void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer,
|
|
fft_type *RealOut, fft_type *ImagOut);
|
|
|
|
#endif
|
|
|