SPKitSecondOrderIIRFilter


User's Guide

SPKitSecondOrderIIRFilter a base class for second order IIR filters. It implements functions common to the four second order Butterworth filter classes: SPKitSecondOrderIIRFilter may be also used as a base class for other second order filters.

Note: SPKitSecondOrderIIRFilter serves only as a base class. It is not intended for direct use.


Programmer's Reference

Defined in <spkit/butterwo.h>
Inherits from SPKitProcessor

SPKitSecondOrderIIRFilter overrides getSample() and setInput(). It also defines a destructor for releasing local buffers allocated by setInput().

Public Members

SPKitError setInput(SPKitProcessor* newInput)
connect an input to the object and initialize it. Allocates a delay buffer for each audio channel of the input object.

Calls SPKitProcessor::setInput().

int getSample(SPKitSample& outputSample, SPKitProcessor* caller)
retrieve a processed audio sample

getSample() multiplies each input sample by the product of previously read and written samples and coefficients.

getSample() stores the processed sample in outputSample. The function returns 0 on end of signal, 1 otherwise.

Protected Members

SPKitFloat C
a temporary variable for calculating filter coefficients

SPKitFloat D
a temporary variable for calculating filter coefficients

SPKitFloat a0
SPKitFloat a1
SPKitFloat a2
coefficients for the current input and previously read samples

SPKitFloat b1
SPKitFloat b2
coefficients for the previously written samples

BWBuffer* chBuf[]
buffers for previously read and written samples

Return to top level.

Author: Kai Lassfolk