-
Notifications
You must be signed in to change notification settings - Fork 45
ProcessingChain
A ProcessingChain can be interpreted as a list of effects processors, belonging to an AudioChannel. The effects are applied in series to the AudioChannels output buffer.
If multiple AudioChannels should have similarly configured effects, it is possible to reuse the same BaseProcessor instances across separate ProcessingChains to reduce memory usage / programming complexity.
ProcessingChain::ProcessingChain();
Creates a new instance of a ProcessingChain.
ProcessingChain::~ProcessingChain();
Clears the vector of BaseProcessors.
void addProcessor( BaseProcessor* aProcessor );
Adds given aProcessor to the list of processors this chain should apply to the incoming channel buffer. The processor is appended at the end of the list and will be applied last. Note that if the processor was already present in the list, it won't be added twice.
bool removeProcessor( BaseProcessor* aProcessor );
Removes given aProcessor from the list of processors so it will not apply its processing into the incoming channel buffer any longer.
void reset();
Removes ALL processors from the list. The incoming channel buffer will be unaffected by and processing.
std::vector<BaseProcessor*> getActiveProcessors();
Returns all registered processors of this chain. This is invoked by the AudioEngine when its processing the associated AudioChannel. If this vector contains items, the registered BaseProcessors will apply their process onto the AudioChannels AudioBuffer in the order they were added to the chain.
std::vector<BaseProcessor*> _activeProcessors;
The vector containing all processors that apply to this chain.