From cc33ed160f49ba49ada5d74c9137a634c15fbb2d Mon Sep 17 00:00:00 2001 From: KIRA Ryouta Date: Tue, 13 Feb 2024 10:36:47 +0900 Subject: [PATCH] Fixed a bug that causes invalid effect output --- src/sfizz/Synth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 4ad783dc..a06777a7 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -1159,7 +1159,6 @@ void Synth::renderBlock(AudioSpan buffer) noexcept { // Main render block ScopedTiming logger { callbackBreakdown.renderMethod, ScopedTiming::Operation::addToDuration }; - tempMixSpan->fill(0.0f); for (auto& voice : impl.voiceManager_) { if (voice.isFree()) @@ -1197,6 +1196,7 @@ void Synth::renderBlock(AudioSpan buffer) noexcept const int numChannels = static_cast(buffer.getNumChannels()); for (int i = 0; i < impl.numOutputs_; ++i) { + tempMixSpan->fill(0.0f); const auto outputStart = numChannels == 0 ? 0 : (2 * i) % numChannels; auto outputSpan = buffer.getStereoSpan(outputStart); const auto& effectBuses = impl.getEffectBusesForOutput(i);