JUCE’s interpolator classes like
CatmullRomInterpolator are stateful. Therefore, if I want to use them on multi-channel signals, I need to construct one instance per channel.
In general, the number of audio channels is variable. Therefore, it is useful to have a
std::vector of such interpolators, so I can resize it depending on how many channels I want to process.
However, they are declared
JUCE_NON_COPYABLE, which renders them not only non-copyable, but also non-noexcept-moveable. This latter property means I cannot put them into a
std::vector. I can only put them into a
std::array with a fixed size equal to the maximum number of channels I ever want to process. This is wasting memory.
Would you consider making them at least noexcept-moveable, if they have to be non-copyable? Or otherwise, what pattern would you recommend for allocating per-channel JUCE objects in a scenario where the number of channels is dynamic?