|
| | FFTReal (size_t size) |
| | Constructs a real FFT processor.
|
| |
| size_t | getSize () const noexcept |
| | Returns the number of real input samples (N).
|
| |
| size_t | getFrequencyDomainSize () const noexcept |
| | Returns the frequency-domain buffer size in elements (N + 2).
|
| |
| size_t | getNumBins () const noexcept |
| | Returns the number of frequency bins (N/2 + 1) including DC and Nyquist.
|
| |
| void | forward (const T *timeData, T *freqData) noexcept |
| | Forward transform: real time-domain -> complex frequency-domain.
|
| |
| void | inverse (const T *freqData, T *timeData) noexcept |
| | Inverse transform: complex frequency-domain -> real time-domain.
|
| |
| void | computeMagnitudes (const T *freqData, T *magnitudes) const noexcept |
| | Computes the magnitude of each frequency bin.
|
| |
| void | computePhases (const T *freqData, T *phases) const noexcept |
| | Computes the phase angle of each frequency bin.
|
| |
| void | computePowerSpectrum (const T *freqData, T *power) const noexcept |
| | Computes the power spectrum (magnitude squared) of each bin.
|
| |
template<typename T>
class dspark::FFTReal< T >
FFT optimised for real-valued input signals (the common audio case).
Uses a half-size complex FFT internally, saving ~50% computation.
Frequency domain layout: N+2 elements (interleaved complex).
- Bins 0 to N/2 inclusive -> (N/2 + 1) complex values -> (N + 2) floats.
data[2*k] = real part of bin k.
data[2*k+1] = imaginary part of bin k.
- Bin 0 = DC, bin N/2 = Nyquist.
In-place use is supported: timeData and freqData may point to the same buffer as long as it holds getFrequencyDomainSize() = N+2 elements.
- Template Parameters
-
| T | Sample type (float or double). |
Definition at line 418 of file FFT.h.