This might save you a bit of headache: Apple recently included (osx 10.9 SDK) a biquad in vDSP to simplify the process, so you don't need to use vDSP_deq22 anymore. It takes care of the memory allocation/etc for you. I messed with NVDSP, but it is objc and uses a third party audio manager, so I didn't end up using it for anything since I really only care about OSX audiounit plugins, and it seems mostly geared toward iOS. Here are my notes from the developer conference video on the vDSP biquad (or you can just ind them in the videos section of the Apple Developer site--but the part on the biquad is only about 3 minutes of an hour long video):
WWDC 2012 session 708 Accelerate Framework
INPUT ==> Biquad 0 ==> Biquad 1 ==> Biquad N-2 ==> Biquad N-1 ==> OUTPUT
N = 10 ( means 10 stages)
each stage has 5 coefficients and 2 delays
Cascaded Biquad IIR Filter
• Setup... Operate... Destroy
#include <Accelerate/Accelerate.h>
const int N = 10; // N = number of cascaded stages
double filterCoeffs[5 * N] = {...}; //List coefficients
float delays[2 * N + 2] = {0.f, 0.f, ..., 0.f}; // float a delay for each stage
float input[length], output[length];
// Once at start:
vDSP_biquad_Setup setup = vDSP_biquad_CreateSetup(FilterCoeffs, N);
...
vDSP_biquad(setup, delays, input, 1, output, 1, length);
...
// Once at end:
vDSP_biquad_DestroySetup(setup);
I whipped up a quick test a while back to see if it worked plunked it into the apple 'Filter Demo' project, but I can't seem to find that project now.... but here is a snippit of how you might use it (for a single stage) with some notes since they provide no meaningful examples:
const double a0 = ...;
const double a1 = ...;
const double a2 = ...;
const double b1 = ...;
const double b2 = ...;
//Number of filters:
const int N = 1;
//Set Filter coefficients:
double filterCoeffs[5 * N] = {a0, b1, b2, a1, a2}; // I THINK this is the coeff order they use... might be A0, A1, A2, B1, B2??
// float a delay for each stage (only one stage here):
float delays[2 * N + 2] = {0.f};
float input[length], output[length];
//Once at start:
vDSP_biquad_Setup setup = vDSP_biquad_CreateSetup(filterCoeffs, N);
//Cascade them (only one in this test):
vDSP_biquad(setup, delays, input, 1, output, 1, length);
// Once at end: extern void vDSP_biquadm_DestroySetup(vDSP_biquadm_Setup __vDSP_setup)
vDSP_biquad_DestroySetup(setup);
That is obviously incomplete (and probably wrong since I can't find the working project), but should point you in the right direction. ALSO, they changed some things since they initially patched it in and that may/may not be reflected above (also, I think there was a channel setup too... don't remember), so you may have to look up those changes on the developer site.
I dug most info out of the vDSP.h file in the macosx10.9sdk since I could not find any info online except some basic details on the Apple developer site. Just open it up and search for "Cascade biquadratic IIR filters" and it should take you to the usage section.
Hope that helps. I'll post a link to the working project if I manage to dig it up.
-Alex