Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DynamicIIRFilterReader Class Reference

This class is for dynamic infinite impulse response filters with simple coefficients that change depending on the sample rate. More...

#include <DynamicIIRFilterReader.h>

Inheritance diagram for DynamicIIRFilterReader:
Inheritance graph
[legend]

Public Member Functions

 DynamicIIRFilterReader (std::shared_ptr< IReader > reader, std::shared_ptr< IDynamicIIRFilterCalculator > calculator)
 Creates a new DynamicIIRFilterReader.
 
virtual void sampleRateChanged (SampleRate rate)
 The function sampleRateChanged is called whenever the sample rate of the underlying reader changes and thus updates the filter coefficients.
 
- Public Member Functions inherited from IIRFilterReader
 IIRFilterReader (std::shared_ptr< IReader > reader, const std::vector< float > &b, const std::vector< float > &a)
 Creates a new IIR filter reader.
 
virtual sample_t filter ()
 Runs the filtering function.
 
void setCoefficients (const std::vector< float > &b, const std::vector< float > &a)
 Sets new filter coefficients.
 
- Public Member Functions inherited from BaseIIRFilterReader
sample_t x (int pos)
 Retrieves the last input samples.
 
sample_t y (int pos)
 Retrieves the last output samples.
 
virtual void read (int &length, bool &eos, sample_t *buffer)
 Request to read the next length samples out of the source.
 
- Public Member Functions inherited from EffectReader
 EffectReader (std::shared_ptr< IReader > reader)
 Creates a new effect reader.
 
virtual ~EffectReader ()
 Destroys the reader.
 
virtual bool isSeekable () const
 Tells whether the source provides seeking functionality or not.
 
virtual void seek (int position)
 Seeks to a specific position in the source.
 
virtual int getLength () const
 Returns an approximated length of the source in samples.
 
virtual int getPosition () const
 Returns the position of the source as a sample count value.
 
virtual Specs getSpecs () const
 Returns the specification of the reader.
 
- Public Member Functions inherited from IReader
virtual ~IReader ()
 Destroys the reader.
 

Additional Inherited Members

- Protected Member Functions inherited from BaseIIRFilterReader
 BaseIIRFilterReader (std::shared_ptr< IReader > reader, int in, int out)
 Creates a new base IIR filter reader.
 
void setLengths (int in, int out)
 Sets the length for the required input and output samples of the IIR filter.
 
- Protected Attributes inherited from EffectReader
std::shared_ptr< IReaderm_reader
 The reader to read from.
 

Detailed Description

This class is for dynamic infinite impulse response filters with simple coefficients that change depending on the sample rate.

Constructor & Destructor Documentation

◆ DynamicIIRFilterReader()

DynamicIIRFilterReader::DynamicIIRFilterReader ( std::shared_ptr< IReader > reader,
std::shared_ptr< IDynamicIIRFilterCalculator > calculator )

Creates a new DynamicIIRFilterReader.

Parameters
readerThe reader the filter is applied on.
calculatorThe IDynamicIIRFilterCalculator that recalculates the filter coefficients.

Member Function Documentation

◆ sampleRateChanged()

virtual void DynamicIIRFilterReader::sampleRateChanged ( SampleRate rate)
virtual

The function sampleRateChanged is called whenever the sample rate of the underlying reader changes and thus updates the filter coefficients.

Parameters
rateThe new sample rate.

Reimplemented from BaseIIRFilterReader.


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