|
| | ProcessorDuplicatorT ()=default |
| void | prepare (int num_channels, SampleType sample_rate) |
| | Prepare for processing with the given number of channels.
|
| void | process (SampleType *const *channels, int num_channels, int num_samples) |
| | Process a multi-channel buffer in-place channels: array of channel pointers num_channels: number of channels num_samples: samples per channel.
|
| void | process_channel (SampleType *buffer, int channel, int num_samples) |
| | Process a single channel.
|
| P & | operator[] (int channel) |
| | Access individual channel processor (e.g., to set parameters).
|
| const P & | operator[] (int channel) const |
| template<typename Func> |
| void | for_each (Func &&fn) |
| | Set parameters on all channel processors.
|
| void | reset () |
| | Reset all channel processors.
|
| int | num_channels () const |
template<typename P, typename SampleType = float>
class pulp::signal::ProcessorDuplicatorT< P, SampleType >
Duplicates a mono processor across N channels.
The processor type P must support:
- default constructor
- set_sample_rate(float)
- process(float) -> float (single-sample)
- reset()
When P also provides an in-place block path process(SampleType*, int), each channel is handed to it whole instead of being looped through the single-sample call, so a processor whose block path keeps its state in registers gets that benefit here too. P's block path must be equivalent to looping its single-sample path.
RT contract: prepare() resizes channel storage and is not audio-callback safe. process(), process_channel(), for_each(), and reset() allocate no memory after prepare when P follows the same contract.