There are a few variables that appear with different capitalization within your code sample. Is this a cut/paste error, or have you actually defined all of these variables? E.g “Delay” and “delay”, “ValL” and “valL”, “SampleL” and “sampleL” .
The actual variable name of “delay” is “linear InterpolatedDelay” which is juce::dsp::Delayline and valL is a float variable inside the process block function.
I also added some functions for mixing such as “pushSampleAverage”.
Sorry for the lack of clarity. There is of course a “valR” as well for stereo.
The code builds and runs fine in standalone and on Windows Reaper and FL Studio (although it did used to explode in feedback on FL Studio sometimes). I’m now testing with X Code and Logic Pro and it either goes silent or gives an extreme feedback distortion - clipped sound.
I always call buffer.getNumSamples() so Im not sure how it could be caused by buffer sizes.
I meant to ask “is the delay logic faulty?” and what could cause the DAW behaviour?
processBlock in PluginProcessor can receive different block sizes which you have to honour. People have been caught out before hard-coding block sizes in their code.
Likewise, make sure you handle the sample rate given in PluginProcessor’s prepareToPlay to size your delay buffers accordingly.