Browse Source

Added an assertion to check the default latency compensation in processBlockBypassed

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
68277517df
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      modules/juce_audio_processors/processors/juce_AudioProcessor.cpp

+ 7
- 0
modules/juce_audio_processors/processors/juce_AudioProcessor.cpp 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());
}


Loading…
Cancel
Save