Assertion suggestion in AudioProcessor::processBlockBypassed

#1

When the latency of a plugin is not null, we must override AudioProcessor::processBlockBypassed() and compensate it there to avoid timing issues.

So I suggest to add the following in the default AudioProcessor::processBlockBypassed() implementation :

// your processors has some latency but you haven't 
// overridden AudioProcessor::processBlockBypassed().
// you must override it to add latency compensation to avoid situations
// where bypassing will shift the signal forward in time
jassert (getLatencyInSamples() == 0);
0 Likes

#2

Since the number of latency samples is known, there could be even a default delay line in processBlockBypassed…

But somehow I remember issues with “clever” hosts not calling processBlockBypassed at all?
If that’s the case, all is lost anyway…

0 Likes

#3

sure… when we’ll have a delay line in juce! :wink:

meanwhile an assertion would do the job. it’s just to remind us that we got to take care of that and avoid situations like that one for instance : Cubase latency issues

0 Likes

#4

thanks for the commit Tom !

1 Like