The dsp::DelayLine lets us set the maximumDelayInSamples (totalSize) in the constructor – and the DelayLine buffer size is only changed in DelayLine::prepare()… so why can’t we have a parameter in DelayLine::prepare() to also change the maximumDelayInSamples (totalSize) based on the samplerate in prepareToPlay()? That would save us having to allocate a larger size for 192kHz in a 44.1kHz session.
prepareToPlay is always called when the sampleRate changes. so you just put that prepare in it, followed by setting the max delay in samples. in order to make it sampleRate dependant, just multiply sampleRate with some value and put the result into the delay, like sampleRate * .001 for 1ms
oh yeah, sry i really didn’t know JUCE’ implementation myself. i didn’t even consider it to not be able to change its ring buffer’s size lol. but hey, if you know what the problem is just roll your own. only takes a few minutes anyway