|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Zero-allocation streaming STFT framework for spectral processing. More...
#include "FFT.h"#include "WindowFunctions.h"#include "AudioSpec.h"#include "AudioBuffer.h"#include "DenormalGuard.h"#include <algorithm>#include <cassert>#include <cmath>#include <cstddef>#include <memory>#include <vector>

Go to the source code of this file.
Classes | |
| class | dspark::SpectralProcessor< T > |
| High-performance STFT analysis-modification-synthesis pipeline. More... | |
Namespaces | |
| namespace | dspark |
| Main namespace for the DSPark framework. | |
Zero-allocation streaming STFT framework for spectral processing.
Provides a WOLA (Weighted Overlap-Add) STFT pipeline: input ring -> analysis window -> FFT -> user inline callback -> IFFT -> synthesis window -> overlap-add -> output. Analysis and synthesis both use a periodic sqrt-Hann window, so the round-trip window product is Hann and the constant-overlap-add condition holds exactly for every divisor hop.
The processing callback is a template parameter, so the compiler inlines the frequency-domain modification directly into the hop loop: no std::function allocation and no virtual dispatch on the audio thread.
Latency is exactly fftSize samples and is independent of the caller's block sizes: every STFT frame is anchored to its absolute position in the sample stream, so chopping the stream into arbitrary (even 1-sample) blocks produces bit-identical output.
Threading: owner-managed. prepare()/reset() from a setup thread while idle; processBlock() from the audio thread. No cross-thread setters.
Dependencies: FFT.h, WindowFunctions.h, AudioSpec.h, AudioBuffer.h, DenormalGuard.h.
Definition in file SpectralProcessor.h.