This class is a base class for infinite impulse response filters.
More...
#include <BaseIIRFilterReader.h>
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: