Aviate Audio Multiverse Library
|
A High-precision version of IirBiQuadFilter often necessary for complex, multistage filters. More...
#include <LibBasicFunctions.h>
Public Member Functions | |
IirBiQuadFilterHQ (unsigned maxNumStages, const int32_t *coeffs, int coeffShift=0) | |
Construct a Biquad filter with specified number of stages, coefficients and scaling. More... | |
virtual | ~IirBiQuadFilterHQ () |
Destructor. | |
void | changeFilterCoeffs (unsigned numStages, const int32_t *coeffs, int coeffShift=0) |
Reconfigure the filter coefficients. More... | |
bool | process (int16_t *output, int16_t *input, size_t numSamples) |
Process the data using the configured IIR filter. More... | |
A High-precision version of IirBiQuadFilter often necessary for complex, multistage filters.
This class uses CMSIS-DSP biquads with 64-bit internal precision instead of 32-bit.
Aviate::IirBiQuadFilterHQ::IirBiQuadFilterHQ | ( | unsigned | maxNumStages, |
const int32_t * | coeffs, | ||
int | coeffShift = 0 |
||
) |
Construct a Biquad filter with specified number of stages, coefficients and scaling.
See CMSIS-DSP documentation for more details
maxNumStages | number of biquad stages. Each stage has 5 coefficients. |
coeffs | pointer to an array of Q31 fixed-point coefficients (range -1 to +0.999...) |
coeffShift | coeffs are multiplied by 2^coeffShift to support coefficient range scaling |
void Aviate::IirBiQuadFilterHQ::changeFilterCoeffs | ( | unsigned | numStages, |
const int32_t * | coeffs, | ||
int | coeffShift = 0 |
||
) |
Reconfigure the filter coefficients.
See CMSIS-DSP documentation for more details
numStages | number of biquad stages. Each stage has 5 coefficients. |
coeffs | pointer to an array of Q31 fixed-point coefficients (range -1 to +0.999...) |
coeffShift | coeffs are multiplied by 2^coeffShift to support coefficient range scaling |
bool Aviate::IirBiQuadFilterHQ::process | ( | int16_t * | output, |
int16_t * | input, | ||
size_t | numSamples | ||
) |
Process the data using the configured IIR filter.
output and input can be the same pointer if in-place modification is desired
output | poinvoid combine(audio_block_t *out, audio_block_t *in0, audio_block_t *in1)ter to where the output results will be written |
input | pointer to where the input data will be read from |
numSamples | number of samples to process |