HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
class for calculating FFT and Convolution. More...
#include <Fourier.h>
Public Member Functions | |
Fourier (const Fourier &)=delete | |
Fourier & | operator= (const Fourier &)=delete |
Static Public Member Functions | |
static ComplexBuffer | FFT (const DoubleBuffer &doubleBuffer) |
static ComplexBuffer | FFT (const DoubleBuffer &doubleBuffer, size_t fftSize) |
static void | FFT (ComplexBuffer &complexBuffer) |
static void | FFT (ComplexBuffer &complexBuffer, size_t fftSize) |
static void | IFFT (DoubleBuffer &doubleBuffer, ComplexBuffer &complexBuffer) |
static void | IFFT (ComplexBuffer &complexBuffer, bool scale) |
static double | BinFrequencyToIndex (size_t sampleRate, size_t fftSize, double frequency) |
static double | IndexToBinFrequency (size_t sampleRate, size_t fftSize, size_t index) |
static size_t | CalculateFFTSize (size_t bufferSize) |
static DoubleBuffer | Convolve (const DoubleBuffer &source, const DoubleBuffer &kernel) |
static DoubleBuffer | Convolve (const DoubleBuffer &source, const DoubleBuffer &kernel, ConvolutionMode convolutionMode) |
class for calculating FFT and Convolution.
|
static |
computes the forward Fast Fourier Transform.
doubleBuffer | real data in time domain. |
|
static |
computes the forward Fast Fourier Transform.
doubleBuffer | real data in time domain. |
fftSize | size of the FFT. Must be a power of 2, if not the closest power of 2 will be used. |
|
static |
computes the forward Fast Fourier Transform.
complexBuffer | contains the time domain data in input, and frequency domain data in output. |
|
static |
computes the forward Fast Fourier Transform.
complexBuffer | contains the time domain data in input, and frequency domain data in output. |
fftSize | size of the FFT. Must be a power of 2, if not the closest power of 2 will be used. |
|
static |
computes the inverse Fast Fourier Transform.
doubleBuffer | real data in time domain. |
complexBuffer | complex data in frequency domain. |
|
static |
computes the inverse Fast Fourier Transform.
complexBuffer | contains the frequency domain data in input, and time domain data in output. |
scale | indicates whether to divide the output by fftSize. |
|
static |
computes the corresponding bin index to the provided frequency.
sampleRate | the sampling rate of the transformed signal. |
|
static |
computes the corresponding frequency to the provided bin index.
sampleRate | the sampling rate of the transformed signal. |
|
static |
gets the closest power of 2 that is greater than or equal to the bufferSize.
|
static |
computes convolution in Full mode.
|
static |
computes convolution.