A chain of audio processors that processes audio sequentially.
More...
#include <audio_processor.h>
A chain of audio processors that processes audio sequentially.
This class allows adding multiple audio processors and processes the audio through each processor in the chain.
◆ AudioProcessorChain()
| sfFDN::AudioProcessorChain::AudioProcessorChain |
( |
uint32_t | block_size | ) |
|
Constructs an AudioProcessorChain with a specified block size.
- Parameters
-
| block_size | The size of the audio blocks to process. |
- Note
- The block size is used to allocate internal buffers for processing.
◆ AddProcessor()
| bool sfFDN::AudioProcessorChain::AddProcessor |
( |
std::unique_ptr< AudioProcessor > && | processor | ) |
|
Adds an audio processor to the chain.
- Parameters
-
| processor | A unique pointer to the audio processor to add. |
- Returns
- True if the processor was added successfully, false if the output channel count of the last processor does not match the input channel count of the new processor.
◆ Clear()
| void sfFDN::AudioProcessorChain::Clear |
( |
| ) |
|
|
overridevirtual |
◆ Clone()
| std::unique_ptr< AudioProcessor > sfFDN::AudioProcessorChain::Clone |
( |
| ) |
const |
|
overridevirtual |
Creates a copy of the audio processor chain.
- Returns
- A unique pointer to the cloned audio processor chain.
Implements sfFDN::AudioProcessor.
◆ GetProcessor()
| AudioProcessor * sfFDN::AudioProcessorChain::GetProcessor |
( |
uint32_t | index | ) |
const |
Returns a pointer to the processor at the specified index.
- Parameters
-
| index | The index of the processor to retrieve. |
- Returns
- A pointer to the processor at the specified index, or nullptr if the index is out of range.
◆ GetProcessorCount()
| uint32_t sfFDN::AudioProcessorChain::GetProcessorCount |
( |
| ) |
const |
Returns the number of processors in the chain.
- Returns
- The number of processors in the chain.
◆ InputChannelCount()
| uint32_t sfFDN::AudioProcessorChain::InputChannelCount |
( |
| ) |
const |
|
overridevirtual |
◆ OutputChannelCount()
| uint32_t sfFDN::AudioProcessorChain::OutputChannelCount |
( |
| ) |
const |
|
overridevirtual |
◆ Process()
Processes the audio buffers through the chain.
- Parameters
-
| input | The input audio buffer. |
| output | The output audio buffer. |
- Note
- The input and output buffers must have the same sample count.
-
The input buffer's channel count must match the first processor's input channel count, and the output buffer's channel count must match the last processor's output channel count.
-
The sample count of the input and output buffers must match the block size specified during construction.
Implements sfFDN::AudioProcessor.
The documentation for this class was generated from the following file: