5#include "audio_buffer.h"
7#include <nlohmann/json.hpp>
50 virtual std::unique_ptr<AudioProcessor>
Clone()
const = 0;
105 std::unique_ptr<AudioProcessor>
Clone()
const override;
108 uint32_t block_size_ = 0;
109 std::vector<std::unique_ptr<AudioProcessor>> processors_;
111 std::vector<float> work_buffer_a_;
112 std::vector<float> work_buffer_b_;
113 uint32_t max_work_buffer_size_ = 0;
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:18
A chain of audio processors that processes audio sequentially.
Definition audio_processor.h:57
AudioProcessorChain(uint32_t block_size)
Constructs an AudioProcessorChain with a specified block size.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept override
Processes the audio buffers through the chain.
void Clear() override
Clears the internal state of all processors in the chain.
uint32_t InputChannelCount() const override
Returns the number of input channels this processor expects.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the audio processor chain.
uint32_t GetProcessorCount() const
Returns the number of processors in the chain.
bool AddProcessor(std::unique_ptr< AudioProcessor > &&processor)
Adds an audio processor to the chain.
uint32_t OutputChannelCount() const override
Returns the number of output channels this processor produces.
AudioProcessor * GetProcessor(uint32_t index) const
Returns a pointer to the processor at the specified index.
Base class for audio processors.
Definition audio_processor.h:23
virtual std::unique_ptr< AudioProcessor > Clone() const =0
Creates a copy of the audio processor.
virtual uint32_t InputChannelCount() const =0
Returns the number of input channels this processor expects.
virtual void Clear()=0
Clears the internal state of the processor.
virtual void Process(const AudioBuffer &input, AudioBuffer &output) noexcept=0
Process audio buffers.
virtual uint32_t OutputChannelCount() const =0
Returns the number of output channels this processor produces.