|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
High-performance stereo image processor with phase-aligned bass mono. More...
#include <StereoWidth.h>
Public Member Functions | |
| StereoWidth ()=default | |
| ~StereoWidth ()=default | |
| void | prepare (double sampleRate) noexcept |
| Prepares the processor and resets internal states. | |
| void | prepare (const AudioSpec &spec) noexcept |
| Prepares from AudioSpec (unified API). | |
| void | processBlock (AudioBufferView< T > buffer) noexcept |
| Processes an AudioBufferView in-place. | |
| void | setWidth (T width) noexcept |
| Sets the overall stereo width factor. | |
| T | getWidth () const noexcept |
| Returns current width setting. | |
| void | setBassMono (bool enabled, double cutoffHz=100.0) noexcept |
| Toggles Bass Mono and updates the crossover frequency. | |
| void | process (T *left, T *right, int numSamples) noexcept |
| Process a full block of audio. Optimized for SIMD vectorization. | |
| void | reset () noexcept |
| Clears the internal filter states to prevent artifact ringing. | |
| std::vector< uint8_t > | getState () const |
| Serializes the parameter state (setup/UI threads; allocates). | |
| bool | setState (const uint8_t *data, size_t size) |
| Restores parameters from a blob (tolerant; rejects foreign ids). | |
Protected Member Functions | |
| void | updateBassMonoCoeff (double cutoff) noexcept |
High-performance stereo image processor with phase-aligned bass mono.
| T | Sample type (float or double). |
Definition at line 48 of file StereoWidth.h.
|
default |
|
default |
|
inline |
Serializes the parameter state (setup/UI threads; allocates).
Definition at line 174 of file StereoWidth.h.
|
inlinenoexcept |
Returns current width setting.
Definition at line 92 of file StereoWidth.h.
|
inlinenoexcept |
Prepares from AudioSpec (unified API).
Definition at line 67 of file StereoWidth.h.
|
inlinenoexcept |
Prepares the processor and resets internal states.
| sampleRate | Sample rate in Hz. Non-positive or NaN rates are ignored. |
Definition at line 58 of file StereoWidth.h.
|
inlinenoexcept |
Process a full block of audio. Optimized for SIMD vectorization.
| left | Pointer to left channel data. |
| right | Pointer to right channel data. |
| numSamples | Number of samples to process. |
Definition at line 118 of file StereoWidth.h.
|
inlinenoexcept |
Processes an AudioBufferView in-place.
| buffer | Audio buffer (must have >= 2 channels). |
Definition at line 73 of file StereoWidth.h.
|
inlinenoexcept |
Clears the internal filter states to prevent artifact ringing.
Definition at line 167 of file StereoWidth.h.
|
inlinenoexcept |
Toggles Bass Mono and updates the crossover frequency.
| enabled | True activates the phase-aligned bass mono crossover. |
| cutoffHz | Cutoff frequency in Hz (default: 100.0). Non-positive or NaN cutoffs keep the previous crossover (a NaN here poisoned the side filter state permanently); the enabled toggle still applies. |
Definition at line 102 of file StereoWidth.h.
|
inline |
Restores parameters from a blob (tolerant; rejects foreign ids).
Definition at line 184 of file StereoWidth.h.
|
inlinenoexcept |
Sets the overall stereo width factor.
| width | 0.0 = Mono, 1.0 = Original, >1.0 = Widened. Non-finite values are ignored (without the guard, max(0, NaN) resolved to 0: a silent collapse to mono). |
Definition at line 85 of file StereoWidth.h.
|
inlineprotectednoexcept |
Definition at line 195 of file StereoWidth.h.