How to use mutiple Interpolator objects for different channels?

In the API of the Lagrange Interpolator it says, you should have one Interpolatorobject for each channel.
Since the number of channels is only given at runtime, I would like to declare something like a vector or array of Interpolatorobjects in the header of the plugin processor and fill that in prepareToPlay with the required number of objects.
Then I could simply iterate through them in processBuffers by calling each interpolator by InterpolatorVector[channel].
However visual studio 2017 gives me an error when compiling: “No access to private member, which was declared in juce::LagrangeInterpolator class”.
So what would be the best way to achieve, what I want to do here? I am quite new to c++, I do have some experience in c, though.
I hope this thread is in the right place, I am also new to the forum.

The Lagrange interpolator is non-copyable, so if you want to put those into containers, you need to use them via pointers. (Preferably smart pointers so you don’t leak them.)

1 Like

Ok, thanks, just found that solution a couple minutes ago and it works, after like 6h of thinking about it :smiley: