Audacity 3.2.0
|
Much faster that FFT.h's PowerSpectrum
, at least in Short-Time Fourier Transform-like situations, where many power spectra of the same size are needed. Currently only power spectrum, but may be generalized to other uses.
More...
#include <PowerSpectrumGetter.h>
Public Member Functions | |
PowerSpectrumGetter (int fftSize) | |
~PowerSpectrumGetter () | |
void | operator() (PffftFloats alignedBuffer, PffftFloats alignedOutput) |
Computes the power spectrum of buffer into output . More... | |
Private Attributes | |
const int | mFftSize |
PffftSetupHolder | mSetup |
PffftFloatVector | mWork |
Much faster that FFT.h's PowerSpectrum
, at least in Short-Time Fourier Transform-like situations, where many power spectra of the same size are needed. Currently only power spectrum, but may be generalized to other uses.
Definition at line 208 of file PowerSpectrumGetter.h.
|
explicit |
Definition at line 41 of file PowerSpectrumGetter.cpp.
PowerSpectrumGetter::~PowerSpectrumGetter | ( | ) |
Definition at line 48 of file PowerSpectrumGetter.cpp.
void PowerSpectrumGetter::operator() | ( | PffftFloats | alignedBuffer, |
PffftFloats | alignedOutput | ||
) |
Computes the power spectrum of buffer
into output
.
buffer | Input samples of size fftSize . Also gets used as placeholder and gets overwritten, so copy your data elsewhere if you need it again afterwards. |
output | fftSize / 2 + 1 samples. |
Definition at line 52 of file PowerSpectrumGetter.cpp.
References PffftFloats::get(), mFftSize, mSetup, and mWork.
|
private |
Definition at line 224 of file PowerSpectrumGetter.h.
Referenced by operator()().
|
private |
Definition at line 225 of file PowerSpectrumGetter.h.
Referenced by operator()().
|
private |
Definition at line 226 of file PowerSpectrumGetter.h.
Referenced by operator()().