So chDelay is the parameter’s sign and delay its abs value -that seems ok.
I don’t quite get this -you mean the delay line’s length? It’s not a good idea to resize the delay line on a parameter change -set it to the max possible delay for the current sampleRate in prepareToPlay. I don’t think this would cause constant problems, but it would certainly cause them on parameter changes.
It should be called to reset the plugin for some reason -sample rate changes, channel configuration changes, moving the plugin around, etc. Still, you shouldn’t resize anything if the sample rate hasn’t actually changed.
In absence of better explanations, better check it first.