|
| | Crossfade ()=default |
| |
| | ~Crossfade ()=default |
| |
| void | setCurve (Curve curve) noexcept |
| | Sets the crossfade curve type. Thread-safe. Can be called from the GUI thread.
|
| |
| void | setPosition (T position) noexcept |
| | Sets the target crossfade blend position.
|
| |
| T | getPosition () const noexcept |
| | Retrieves the last requested position.
|
| |
| T | process (T a, T b) noexcept |
| | Crossfades between two individual samples.
|
| |
| void | process (const T *inputA, const T *inputB, T *output, int numSamples) noexcept |
| | Crossfades two audio buffers into an output buffer with automatic parameter smoothing.
|
| |
| void | processAutomated (const T *inputA, const T *inputB, const T *positions, T *output, int numSamples) noexcept |
| | Processes crossfading using a per-sample automation buffer.
|
| |
| T | getGainA () const noexcept |
| | Gets the current internal gain multiplier for signal A.
|
| |
| T | getGainB () const noexcept |
| | Gets the current internal gain multiplier for signal B.
|
| |
template<FloatType T>
class dspark::Crossfade< T >
Artifact-free, SIMD-friendly crossfader for two audio signals.
Marked as final to explicitly prohibit inheritance and avoid vtable overhead, adhering to the framework's zero virtual dispatch policy in DSP nodes.
- Template Parameters
-
| T | Sample type (float or double). Requires std::is_floating_point_v<T>. |
Definition at line 45 of file Crossfade.h.
template<FloatType T>
| void dspark::Crossfade< T >::process |
( |
const T * |
inputA, |
|
|
const T * |
inputB, |
|
|
T * |
output, |
|
|
int |
numSamples |
|
) |
| |
|
inlinenoexcept |
Crossfades two audio buffers into an output buffer with automatic parameter smoothing.
If the parameter has changed since the last block, this method automatically applies a linear ramp to the gains across the block to prevent zipper noise. Otherwise, it executes a highly optimized, autovectorization-friendly static gain loop.
- Parameters
-
| inputA | Pointer to the first input buffer array. Must not be null. |
| inputB | Pointer to the second input buffer array. Must not be null. |
| output | Pointer to the output buffer array. Must not be null. |
| numSamples | Number of samples to process. Must be > 0. |
Definition at line 125 of file Crossfade.h.