Non-allocating alternatives for the IIR::Coefficients::make... functions

Yes, the ArrayCoefficients functions are designed so that they do not need to allocate.

Hello, could you share me an example about how are you declaring, preparing and using this new implementation? I couldn’t figure out how to use it correctly…

You can have a look at how I use them in one of my projects here:

They are also used in the official JUCE examples:

Hope that helps :slight_smile:

2 Likes

Thanks a lot for this thread.
I was not aware of the difference between IIR::Coefficients and IIR::ArrayCoefficients. And of course I used the wrong version :laughing:

Maybe there should be a “jassert” added to the IIR::Coefficients makeXXX functions? I mean, there is no reason to use the versions which allocate on the heap I think? And/or add information in the documentation. Something along the lines “Warning: not safe to use in audio thread. Use ArrayCoefficients instead.”