The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
An efficient linear-phase fir filter implementation. More...
Public Member Functions | |
Linearphase_FIR (unsigned order, const F *alphas) | |
Create linear-phase FIR filter. More... | |
~Linearphase_FIR () | |
F | process (const F &in_sample) |
Filter one sample with this linear-phase FIR filter. More... | |
Private Attributes | |
unsigned | m_order |
The filter order of this linear-phase FIR filter. More... | |
F * | m_alphas |
FIR filter coefficients. More... | |
F * | m_output |
Ringbuffer for building future output. More... | |
unsigned | m_now |
current start of ringbuffer More... | |
An efficient linear-phase fir filter implementation.
ADM::Linearphase_FIR< F >::Linearphase_FIR | ( | unsigned | order, |
const F * | alphas | ||
) |
Create linear-phase FIR filter.
order | filter order of this FIR filter. restriction: must be even. |
alphas | pointer to Array of alpha coefficients. Since this class is for linear phase FIR filters only, only (order / 2 + 1) coefficients will be read. (Coefficients for linear-phase FIR filters are symmetric.) |
ADM::Linearphase_FIR< F >::~Linearphase_FIR |
|
inline |
Filter one sample with this linear-phase FIR filter.
in_sample | the current input sample |
|
private |
The filter order of this linear-phase FIR filter.
|
private |
FIR filter coefficients.
Only m_order / 2 + 1 coefficients need to be stored since coefficients of linear-phase FIR filters are symmetric
|
private |
Ringbuffer for building future output.
|
private |
current start of ringbuffer