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:
parent
88e26d7a1e
commit
68277517df
1 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue