sfFDN
Loading...
Searching...
No Matches
sfFDN::DelayInterp Class Reference

Delay line with interpolation. More...

#include <delay_interp.h>

Inheritance diagram for sfFDN::DelayInterp:
[legend]
Collaboration diagram for sfFDN::DelayInterp:
[legend]

Public Member Functions

 DelayInterp (const DelayOptions &config={})
 Constructs a delay line with interpolation.
 
void Clear () override
 Clears all internal states of the delay line.
 
uint32_t GetMaximumDelay () const
 Gets the maximum delay-line length.
 
void SetMaximumDelay (uint32_t delay)
 Sets the maximum delay for the delay line.
 
void SetDelay (float delay)
 Sets the delay for the delay line.
 
float GetDelay () const
 Returns the current delay in samples.
 
float Tick (float input)
 Processes a single sample through the delay line.
 
void Process (const AudioBuffer &input, AudioBuffer &output) noexcept override
 Processes a block of input samples.
 
bool AddNextInputs (std::span< const float > input)
 Adds the next input samples to the delay line.
 
void GetNextOutputs (std::span< float > output)
 Gets the next output samples from the delay line.
 
uint32_t InputChannelCount () const override
 Returns the number of input channels this processor expects.
 
uint32_t OutputChannelCount () const override
 Returns the number of output channels this processor produces.
 
std::unique_ptr< AudioProcessorClone () const override
 Creates a copy of the audio processor.
 
- Public Member Functions inherited from sfFDN::AudioProcessor

Detailed Description

Delay line with interpolation.

Constructor & Destructor Documentation

◆ DelayInterp()

sfFDN::DelayInterp::DelayInterp ( const DelayOptions & config = {})

Constructs a delay line with interpolation.

Parameters
configThe configuration for the delay line.

Member Function Documentation

◆ AddNextInputs()

bool sfFDN::DelayInterp::AddNextInputs ( std::span< const float > input)

Adds the next input samples to the delay line.

Parameters
inputThe input samples to add.
Returns
True if the samples were added successfully, false otherwise.
Note
A return value of false indicates that there was not enough space in the internal buffer to write the input samples. In this case, the internal state remains unchanged. When processing audio in blocks, the delay line maximum delay should be set to a value that is larger than the block size.

◆ Clear()

void sfFDN::DelayInterp::Clear ( )
overridevirtual

Clears all internal states of the delay line.

Implements sfFDN::AudioProcessor.

◆ Clone()

std::unique_ptr< AudioProcessor > sfFDN::DelayInterp::Clone ( ) const
overridevirtual

Creates a copy of the audio processor.

Returns
A unique pointer to the cloned audio processor.

Implements sfFDN::AudioProcessor.

◆ GetNextOutputs()

void sfFDN::DelayInterp::GetNextOutputs ( std::span< float > output)

Gets the next output samples from the delay line.

Parameters
outputThe output samples to fill.

◆ InputChannelCount()

uint32_t sfFDN::DelayInterp::InputChannelCount ( ) const
inlineoverridevirtual

Returns the number of input channels this processor expects.

Implements sfFDN::AudioProcessor.

◆ OutputChannelCount()

uint32_t sfFDN::DelayInterp::OutputChannelCount ( ) const
inlineoverridevirtual

Returns the number of output channels this processor produces.

Implements sfFDN::AudioProcessor.

◆ Process()

void sfFDN::DelayInterp::Process ( const AudioBuffer & input,
AudioBuffer & output )
overridevirtualnoexcept

Processes a block of input samples.

Parameters
inputThe input audio buffer.
outputThe output audio buffer.

Implements sfFDN::AudioProcessor.

◆ SetDelay()

void sfFDN::DelayInterp::SetDelay ( float delay)

Sets the delay for the delay line.

Parameters
delayThe delay in samples.

◆ SetMaximumDelay()

void sfFDN::DelayInterp::SetMaximumDelay ( uint32_t delay)

Sets the maximum delay for the delay line.

Parameters
delayThe maximum delay in samples.

◆ Tick()

float sfFDN::DelayInterp::Tick ( float input)

Processes a single sample through the delay line.

Parameters
inputThe input sample to process.
Returns
The processed output sample.

The documentation for this class was generated from the following file: