I'm trying to grab the coefficients from an IIRFilter object to use for calculating magnitudes to plot the frequency response of the filter. The filter works fine, passes audio and does exactly what it should do.
The class offers a function getCoefficients(), which should return an IIRCoefficients object containing the Filters coefficient object.
The function gets called, but I get a exc_bad_access error when assigning them to the new IIRCoefficents object.
I've tried pretty much every concievable way to get this working, with no joy. I've tried assigning to a float array, pointers etc.
For example. I create the new IIRCoefficient object like this :
IIRCoefficients filterCoefs = eqHP.getCoefficients();
but I get the exc error called on memcpy function below:
IIRCoefficients::IIRCoefficients (const IIRCoefficients& other) noexcept
memcpy (coefficients, other.coefficients, sizeof (coefficients));
Has anyone come across this ? and if so could you be so kind as to share the correct way of doing this.