If I get it right, the const-ness of the samples hold by a
dsp::AudioBlock is denoted by declaring the sample type
dsp::AudioBlock<const float> but not by declaring the block itself const.
This makes it easy to write interfaces like
void myDspFunction (const dsp::AudioBlock<float>& b) and directly pass an
AudioBuffer<float> to it, making use of the implicit conversion constructor of the
dsp::ProcessContextReplacing constructor takes a non-const reference to an audio block, which makes it impossible to pass an
AudioBuffer to it directly, instead you have to create a temporary audio block on the stack and pass that to the context, which makes some short processing routines unnecessarily convoluted.
I wonder if this is an implementation flaw that could be changed (and if so would kindly ask the team to do so) or if I’m overlooking something here?