What is the format for a complex wire buffer? I am assuming it would packed real then complex. Is this correct?
So an example for accessing the complex data would be:
awe_modaxisSBInstance *S = (awe_modaxisSBInstance *)pInstance;
WireInstance **pWires = ClassModule_GetWires(S);
cplx *src = (cplx *)pWires[0];
cplx *sbL = src+0;
cplx *sbR = src+1;
cplx *dst = (cplx *)pWires[1];
cplx *subBandVcaL = dst+0;
cplx *subBandVcaR = dst+1;
TaxisSB *A = (TaxisSB *)S->aStruct;
axisSB
(
A,
sbL,
sbR,
subBandVcaL,
subBandVcaR
);
cplx is defined as:
typedef struct {
float r;
float i;
}cplx;
10:18am
Hi Darrel,
Yes, you are correct that complex data is packed [real,imaginary,real,imaginary,...] in the buffers. Though you should be accessing the 'buffer' element of the pWires structure, as below:
cplx *src = (cplx *)pWires[0]->buffer;
And of course your implementation assumes stereo input, but I'm sure you have some enforcement that guarantees that so it shouldn't be a problem.
-Axel