|
sfFDN
|
A parallel gains processor. More...
#include <parallel_gains.h>
Public Member Functions | |
| ParallelGains (ParallelGainsMode mode) | |
| Constructs a ParallelGains processor. | |
| ParallelGains (const ParallelGainsOptions &options) | |
| Constructs a ParallelGains processor. | |
| ParallelGains (ParallelGainsMode mode, std::span< const float > gains) | |
| Constructs a ParallelGains processor. | |
| void | SetMode (ParallelGainsMode mode) |
| Sets the processing mode. | |
| void | SetGains (std::span< const float > gains) |
| Sets the gains for each channel. | |
| void | GetGains (std::span< float > gains) const |
| Gets the gains for each channel. | |
| void | Process (const AudioBuffer &input, AudioBuffer &output) noexcept override |
| Processes the audio buffer. | |
| uint32_t | InputChannelCount () const override |
| Gets the number of input channels supported. | |
| uint32_t | OutputChannelCount () const override |
| Gets the number of output channels supported. | |
| void | Clear () override |
| Clears the internal state of the processor. | |
| std::unique_ptr< AudioProcessor > | Clone () const override |
| Creates a copy of the ParallelGains processor. | |
Public Member Functions inherited from sfFDN::AudioProcessor | |
A parallel gains processor.
Supports three modes:
| sfFDN::ParallelGains::ParallelGains | ( | ParallelGainsMode | mode | ) |
Constructs a ParallelGains processor.
| mode | The processing mode to use. |
| sfFDN::ParallelGains::ParallelGains | ( | const ParallelGainsOptions & | options | ) |
Constructs a ParallelGains processor.
| options | The options for the processor. |
| sfFDN::ParallelGains::ParallelGains | ( | ParallelGainsMode | mode, |
| std::span< const float > | gains ) |
Constructs a ParallelGains processor.
| mode | The processing mode to use. |
| gains | A span of gains to apply to each channel. |
|
overridevirtual |
Clears the internal state of the processor.
This function does nothing as there is no internal state to clear.
Implements sfFDN::AudioProcessor.
|
overridevirtual |
Creates a copy of the ParallelGains processor.
Implements sfFDN::AudioProcessor.
| void sfFDN::ParallelGains::GetGains | ( | std::span< float > | gains | ) | const |
Gets the gains for each channel.
| gains | A span to store the gains. The size of the span must be equal to the number of gains set in SetGains(). |
|
overridevirtual |
Gets the number of input channels supported.
Implements sfFDN::AudioProcessor.
|
overridevirtual |
Gets the number of output channels supported.
Implements sfFDN::AudioProcessor.
|
overridevirtualnoexcept |
Processes the audio buffer.
| input | The input audio buffer. |
| output | The output audio buffer. The input and output buffers must have the same number of samples. For ParallelGainsMode::Split, the input buffer must have 1 channels and the output buffer must have OutputChannelCount() channels. For ParallelGainsMode::Merge, the input buffer must have InputChannelCount() channels and the output buffer must have 1 channels. For ParallelGainsMode::Parallel, the input and output buffers must have the same number of channels equal to InputChannelCount() and OutputChannelCount(). |
Implements sfFDN::AudioProcessor.
| void sfFDN::ParallelGains::SetGains | ( | std::span< const float > | gains | ) |
Sets the gains for each channel.
| gains | A span of gains to apply to each channel. The size of the span must be equal to InputChannelCount() for ParallelGainsMode::Merge. The size of the span must be equal to OutputChannelCount() for ParallelGainsMode::Split. The size of the span must be equal to InputChannelCount() and OutputChannelCount() for ParallelGainsMode::Parallel. |
| void sfFDN::ParallelGains::SetMode | ( | ParallelGainsMode | mode | ) |
Sets the processing mode.
| mode | The processing mode to use. |