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

Implements a sparse FIR filter. More...

#include <filter.h>

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

Public Member Functions

 SparseFir (const SparseFirOptions &config={})
 Constructs a sparse FIR filter.
 
 SparseFir (const SparseFir &)=delete
 
SparseFiroperator= (const SparseFir &)=delete
 
 SparseFir (SparseFir &&other) noexcept
 
SparseFiroperator= (SparseFir &&other) noexcept
 
void SetCoefficients (const SparseFirOptions &config={})
 Sets the FIR coefficients.
 
float Tick (float in) noexcept SFFDN_NONBLOCKING
 Input a sample in the filter and return the next output.
 
void Process (const AudioBuffer &input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING override
 Processes a block of input samples through the filter.
 
uint32_t InputChannelCount () const noexcept SFFDN_NONBLOCKING override
 Returns the number of input channels supported by this processor.
 
uint32_t OutputChannelCount () const noexcept SFFDN_NONBLOCKING override
 Returns the number of output channels produced by this processor.
 
void Clear () override
 Clears the internal state of the processor.
 
std::unique_ptr< AudioProcessorClone () const override
 Creates a copy of the filter.
 
- Public Member Functions inherited from sfFDN::AudioProcessor

Additional Inherited Members

- Protected Member Functions inherited from sfFDN::AudioProcessor
 AudioProcessor (const AudioProcessor &)=default
 
AudioProcessoroperator= (const AudioProcessor &)=default
 
 AudioProcessor (AudioProcessor &&) noexcept=default
 
AudioProcessoroperator= (AudioProcessor &&) noexcept=default
 

Detailed Description

Implements a sparse FIR filter.

Member Function Documentation

◆ Clear()

void sfFDN::SparseFir::Clear ( )
overridevirtual

Clears the internal state of the processor.

This function resets the internal state of the filter to zero.

Implements sfFDN::AudioProcessor.

◆ Clone()

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

Creates a copy of the filter.

Returns
A unique pointer to the cloned filter.

Implements sfFDN::AudioProcessor.

◆ InputChannelCount()

uint32_t sfFDN::SparseFir::InputChannelCount ( ) const
overridevirtualnoexcept

Returns the number of input channels supported by this processor.

Returns
The number of input channels.

Implements sfFDN::AudioProcessor.

◆ OutputChannelCount()

uint32_t sfFDN::SparseFir::OutputChannelCount ( ) const
overridevirtualnoexcept

Returns the number of output channels produced by this processor.

Returns
The number of output channels.

Implements sfFDN::AudioProcessor.

◆ Process()

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

Processes a block of input samples through the filter.

Parameters
inputThe input audio buffer.
outputThe output audio buffer. The input and output buffers must have the same number of channels and sample count.

Implements sfFDN::AudioProcessor.

◆ SetCoefficients()

void sfFDN::SparseFir::SetCoefficients ( const SparseFirOptions & config = {})

Sets the FIR coefficients.

Parameters
configThe FIR coefficients.

◆ Tick()

float sfFDN::SparseFir::Tick ( float in)
noexcept

Input a sample in the filter and return the next output.

Parameters
inThe input sample
Returns
The next output sample

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