How to update cofficients of vDSP_biquad_SetupD???

Hi there I'm writing some audio plug-ins that use biquad filtering of incoming audio. The audio is supplied to me as vectors of doubles. I am using the Accelerate callbacks of vDSP_biquad_CreateSetupD, vDSP_biquad_DestroySetupD and vDSP_biquadD on a vDSP_biquad_SetupD struct.

When the user changes the filter parameters, I want to update the coefficients of the biquad filter. I assumed that I would be able to use the new vDSP_biquad_SetCoefficientsDouble callback, but that requires a vDSP_biquad_Setup rater than a vDSP_biquad_SetupD — i.e. a single-precision vector, rather than the double-precision vector that I would have thought it would require. Is that an error? How do I update the coefficients of a double-precision object?

Thanks in advance, Michael

Replies

Hi,

vDSP doesn't provide functions to set the coefficients on a double-precision, single-channel biquadratic filter object.

You have two options: either convert your double-precision data to single-precision (see vDSP_vdpsp), or use a double-precision, multichannel biquadratic filter object and set the coefficients with vDSP_biquadm_SetCoefficientsDoubleD..