Krotos Modules 3
Loading...
Searching...
No Matches
audiofft::AudioFFT Class Reference

Performs 1D FFTs. More...

#include <AudioFFT.h>

Public Member Functions

 AudioFFT ()
 Constructor.
 
 AudioFFT (const AudioFFT &)=delete
 
AudioFFToperator= (const AudioFFT &)=delete
 
 ~AudioFFT ()
 Destructor.
 
void init (size_t size)
 Initializes the FFT object.
 
void fft (const float *data, float *re, float *im)
 Performs the forward FFT.
 
void ifft (float *data, const float *re, const float *im)
 Performs the inverse FFT.
 

Static Public Member Functions

static size_t ComplexSize (size_t size)
 Calculates the necessary size of the real/imaginary complex arrays.
 

Private Attributes

std::unique_ptr< detail::AudioFFTImpl_impl
 

Detailed Description

Performs 1D FFTs.

Constructor & Destructor Documentation

◆ AudioFFT() [1/2]

audiofft::AudioFFT::AudioFFT ( )

Constructor.

◆ AudioFFT() [2/2]

audiofft::AudioFFT::AudioFFT ( const AudioFFT & )
delete

◆ ~AudioFFT()

audiofft::AudioFFT::~AudioFFT ( )

Destructor.

Member Function Documentation

◆ ComplexSize()

size_t audiofft::AudioFFT::ComplexSize ( size_t size)
static

Calculates the necessary size of the real/imaginary complex arrays.

Parameters
sizeThe size of the real data
Returns
The size of the real/imaginary complex arrays

◆ fft()

void audiofft::AudioFFT::fft ( const float * data,
float * re,
float * im )

Performs the forward FFT.

Parameters
dataThe real input data (has to be of the length as specified in init())
reThe real part of the complex output (has to be of length as returned by ComplexSize())
imThe imaginary part of the complex output (has to be of length as returned by ComplexSize())

◆ ifft()

void audiofft::AudioFFT::ifft ( float * data,
const float * re,
const float * im )

Performs the inverse FFT.

Parameters
dataThe real output data (has to be of the length as specified in init())
reThe real part of the complex input (has to be of length as returned by ComplexSize())
imThe imaginary part of the complex input (has to be of length as returned by ComplexSize())

◆ init()

void audiofft::AudioFFT::init ( size_t size)

Initializes the FFT object.

Parameters
sizeSize of the real input (must be power 2)

◆ operator=()

AudioFFT & audiofft::AudioFFT::operator= ( const AudioFFT & )
delete

Member Data Documentation

◆ _impl

std::unique_ptr<detail::AudioFFTImpl> audiofft::AudioFFT::_impl
private

The documentation for this class was generated from the following files: