From 81a76efcd3fa454a027cfcf273f90ff5db354fe0 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 8 Jan 2018 12:36:24 +0000 Subject: [PATCH] Fix for dsp::ProcessorChain when used with a non-replacing context --- modules/juce_dsp/processors/juce_ProcessorChain.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 004380176d..4566c463ea 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -72,7 +72,17 @@ namespace ProcessorHelpers // Internal helper classes used in building the Proc void process (ProcessContext& context) noexcept { Base::processor.process (context); - processors.process (context); + + if (context.usesSeparateInputAndOutputBlocks()) + { + jassert (context.getOutputBlock().getNumChannels() == context.getInputBlock().getNumChannels()); + ProcessContextReplacing replacingContext (context.getOutputBlock()); + processors.process (replacingContext); + } + else + { + processors.process (context); + } } void reset()