5#include "audio_buffer.h"
23 Delay(uint32_t delay = 0, uint32_t max_delay = 4095);
111 void GetNextOutputsAt(std::span<uint32_t> taps, std::span<float> output, std::span<float> coeffs);
159 std::vector<float> buffer_;
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:18
A simple non-interpolating delay line implementation.
Definition delay.h:16
void SetDelay(uint32_t delay)
Sets the delay for the delay line.
std::span< float > GetNextOutputBuffers(uint32_t size)
Get a span pointing to the next writable region of the buffer.
void GetNextReadAndWriteBuffers(std::span< float > &read_buffer, std::span< float > &write_buffer, uint32_t size)
Gets the next read and write buffers for the delay line.
void Process(const AudioBuffer input, AudioBuffer &output)
Processes a block of input samples.
float NextOut() const
Returns the next output sample.
uint32_t GetDelay(void) const
Returns the current delay in samples.
Definition delay.h:49
float LastOut() const
Returns the last output sample from the delay line.
bool AddNextInputs(std::span< const float > input)
Adds the next input samples to the delay line.
void AdvanceWrite(uint32_t sample_count)
Advances the write pointer of the delay line by a specified number of samples.
float TapOut(uint32_t tap) const
Taps the output of the delay line at a specific point.
uint32_t GetMaximumDelay() const
Gets the maximum delay-line length.
void AdvanceRead(uint32_t sample_count)
Advances the read pointer of the delay line by a specified number of samples.
Delay(uint32_t delay=0, uint32_t max_delay=4095)
Constructs a delay line with a specified delay and maximum delay.
float Tick(float input)
Processes the next input sample.
std::span< float > GetNextInputBuffers(uint32_t size)
Get a span pointing to the next writable region of the buffer.
void Clear()
Clears the delay line, resetting the internal buffer.
void GetNextOutputs(std::span< float > output)
Gets the next output samples from the delay line.
void SetMaximumDelay(uint32_t delay)
Sets the maximum delay for the delay line.
void GetNextOutputsAt(std::span< uint32_t > taps, std::span< float > output, std::span< float > coeffs)
Gets the next output samples from the delay line at specific tap points.