This class is a base class for infinite impulse response filters.
More...
#include <BaseIIRFilterReader.h>
|
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.
|
|
virtual sample_t | filter ()=0 |
| Runs the filtering function.
|
|
virtual void | sampleRateChanged (SampleRate rate) |
| Notifies the filter about a sample rate change.
|
|
| 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.
|
|
virtual | ~IReader () |
| Destroys the reader.
|
|
|
| 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.
|
|
|
std::shared_ptr< IReader > | m_reader |
| The reader to read from.
|
|
This class is a base class for infinite impulse response filters.
◆ BaseIIRFilterReader()
BaseIIRFilterReader::BaseIIRFilterReader |
( |
std::shared_ptr< IReader > | reader, |
|
|
int | in, |
|
|
int | out ) |
|
protected |
Creates a new base IIR filter reader.
- Parameters
-
reader | The reader to read from. |
in | The count of past input samples needed. |
out | The count of past output samples needed. |
◆ filter()
virtual sample_t BaseIIRFilterReader::filter |
( |
| ) |
|
|
pure virtual |
◆ read()
virtual void BaseIIRFilterReader::read |
( |
int & | length, |
|
|
bool & | eos, |
|
|
sample_t * | buffer ) |
|
virtual |
Request to read the next length samples out of the source.
The buffer supplied has the needed size.
- Parameters
-
[in,out] | length | The count of samples that should be read. Shall contain the real count of samples after reading, in case there were only fewer samples available. A smaller value also indicates the end of the reader. |
[out] | eos | End of stream, whether the end is reached or not. |
[in] | buffer | The pointer to the buffer to read into. |
Reimplemented from EffectReader.
◆ sampleRateChanged()
virtual void BaseIIRFilterReader::sampleRateChanged |
( |
SampleRate | rate | ) |
|
|
virtual |
◆ setLengths()
void BaseIIRFilterReader::setLengths |
( |
int | in, |
|
|
int | out ) |
|
protected |
Sets the length for the required input and output samples of the IIR filter.
- Parameters
-
in | The amount of past input samples needed, including the current one. |
out | The amount of past output samples needed. |
◆ x()
sample_t BaseIIRFilterReader::x |
( |
int | pos | ) |
|
|
inline |
Retrieves the last input samples.
- Parameters
-
pos | The position, valid are 0 (current) or negative values. |
- Returns
- The sample value.
◆ y()
sample_t BaseIIRFilterReader::y |
( |
int | pos | ) |
|
|
inline |
Retrieves the last output samples.
- Parameters
-
pos | The position, valid are negative values. |
- Returns
- The sample value.
The documentation for this class was generated from the following file: