FFT¶
class FFT
The Fast Fourier Transform (FFT) class.
This utility class is used to perform Fast Fourier Transform (FFT) operations on audio data with real-to-complex/complex-to-real routines. The algorithm is highly optimized for speed, and the class provides and high-level API for the user.
The output of the operation is ready-to-use, that means all the post processing operations (scale, normalization, etc.) have been applied.
Functions¶
| Name | Description |
|---|---|
| GetOutputSize | Gets the FFT output buffer size. |
| FFT | The default constructor. |
| ~FFT | Destructor. |
| Initialize | Initializes the FFT instance. |
| Forward | Performs the forward FFT operation. |
| Backward | Performs the inverse FFT operation. |
Function Details¶
Backward¶
void Backward(AmReal32* output, SplitComplex& splitComplex) const
Performs the inverse FFT operation.
- Parameter
output - The output audio data. This buffer needs to be of the same size as the one provided to the
Initialize()method. - Parameter
splitComplex - The complex buffer output separated into real and imaginary parts. The buffer will be resized if necessary.
FFT¶
FFT()
The default constructor.
Forward¶
void Forward(const AmReal32* input, SplitComplex& splitComplex) const
Performs the forward FFT operation.
- Parameter
input - The input audio data. This buffer needs to be of the same size as the one provided to the
Initialize()method. - Parameter
splitComplex - The complex buffer output separated into real and imaginary parts. The buffer will be resized if necessary.
GetOutputSize¶
static AmUInt64 GetOutputSize(AmUInt64 inputSize)
Gets the FFT output buffer size.
- Parameter
inputSize - The size of the input buffer.
- Return
- The size of the FFT output buffer for the given input size.
Initialize¶
void Initialize(AmSize size) const
Initializes the FFT instance.
- Parameter
size - The size of the input (as a power of 2).
~FFT¶
~FFT()
Destructor.