Fixed-capacity signed audio routing matrix with sample-continuous gain ramps.
More...
|
| | AudioMatrixMixerT (const Allocator &allocator=Allocator{}) |
| bool | prepare (std::size_t max_block_size) |
| bool | set_dimensions (std::size_t inputs, std::size_t outputs) noexcept |
| void | set_headroom_policy (MatrixHeadroomPolicy policy) noexcept |
| | Headroom policy is structural, not automatable: change it while stopped or accept a block-boundary level change.
|
| MatrixHeadroomPolicy | headroom_policy () const noexcept |
| bool | set_gain (std::size_t output, std::size_t input, SampleType gain) noexcept |
| bool | set_gain_ramped (std::size_t output, std::size_t input, SampleType gain, std::size_t ramp_samples) noexcept |
| | The old value is used for the first sample.
|
| SampleType | gain (std::size_t output, std::size_t input) const noexcept |
| SampleType | target_gain (std::size_t output, std::size_t input) const noexcept |
| std::size_t | input_count () const noexcept |
| std::size_t | output_count () const noexcept |
| std::size_t | max_block_size () const noexcept |
| std::size_t | nonfinite_gain_count () const noexcept |
| std::size_t | out_of_range_gain_count () const noexcept |
| void | reset () noexcept |
| | Clears scratch and settles active ramps at their targets.
|
| bool | process (const SampleType *const *inputs, std::size_t input_count, SampleType *const *outputs, std::size_t output_count, std::size_t frames) noexcept |
template<typename SampleType = float, std::size_t MaxInputs = 16, std::size_t MaxOutputs = 16, typename Allocator = std::allocator<SampleType>>
requires
detail::valid_audio_matrix_capacity<MaxInputs, MaxOutputs>
class pulp::signal::AudioMatrixMixerT< SampleType, MaxInputs, MaxOutputs, Allocator >
Fixed-capacity signed audio routing matrix with sample-continuous gain ramps.
prepare() is control-thread-only and owns the sole allocation. All setters, reset(), and process() are allocation-free afterward. Gain automation is deterministic across block partitions. Non-finite gains become zero and are counted; non-finite audio follows normal IEEE propagation.
Input/output aliasing, including partial overlap, is supported because every input block is copied to prepared scratch before any output is written. Output buffers themselves must not overlap each other.
template<typename SampleType = float, std::size_t MaxInputs = 16, std::size_t MaxOutputs = 16, typename Allocator = std::allocator<SampleType>>
Clears scratch and settles active ramps at their targets.
Matrix shape, gains, policy, and the non-finite diagnostic count are preserved.
template<typename SampleType = float, std::size_t MaxInputs = 16, std::size_t MaxOutputs = 16, typename Allocator = std::allocator<SampleType>>
| bool pulp::signal::AudioMatrixMixerT< SampleType, MaxInputs, MaxOutputs, Allocator >::set_gain_ramped |
( |
std::size_t | output, |
|
|
std::size_t | input, |
|
|
SampleType | gain, |
|
|
std::size_t | ramp_samples ) |
|
inlinenoexcept |
The old value is used for the first sample.
After ramp_samples frames the internal state equals the target, which is emitted on the following frame. Retargeting starts from the gain that would be used for the next sample, so no discontinuity is introduced.