vDSP_biquad_CreateSetupD
Builds a data structure that contains precalculated data for use by a double-precision cascaded biquadratic filter function.
Declaration
extern vDSP_biquad_SetupD vDSP_biquad_CreateSetupD(const double *__Coefficients, vDSP_Length __M);Parameters
- __Coefficients:
The input array that contains the double-precision filter coefficients. The number of elements in the coefficients array must be five times the number of sections in the biquad filter.
- __M:
The number of sections in the biquad filter.
Return Value
A pointer to an allocated and initialized biquadratic filter object.
Discussion
This function constructs and returns a biquadratic filter object from the coefficients that you specify.
You define the __Coefficients array as a series of sections with each containing a set of five coefficients. Specify the order of the coefficients as three feedforward coefficients followed by two feedback coefficients.
The following code shows an example of creating a biquad setup object that contains two sections:
This function allocates memory for its own use. You must call the vDSP_biquad_DestroySetupD function to free the allocated memory.