1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-20 01:14:20 +00:00

Added an assertion to check the default latency compensation in processBlockBypassed

This commit is contained in:
Tom Poole 2019-03-26 11:34:25 +00:00
parent 88e26d7a1e
commit 68277517df

View file

@ -760,6 +760,13 @@ void AudioProcessor::reset() {}
template <typename floatType>
void AudioProcessor::processBypassed (AudioBuffer<floatType>& buffer, MidiBuffer&)
{
// If you hit this assertion then your plug-in is reporting that it introduces
// some latency, but you haven't overridden processBlockBypassed to produce
// an identical amount of latency. Without identical latency in
// processBlockBypassed a host's latency compensation could shift the audio
// passing through your bypassed plug-in forward in time.
jassert (getLatencySamples() == 0);
for (int ch = getMainBusNumInputChannels(); ch < getTotalNumOutputChannels(); ++ch)
buffer.clear (ch, 0, buffer.getNumSamples());
}