Skip to content

Commit

Permalink
Fixed a bug that causes invalid effect output
Browse files Browse the repository at this point in the history
  • Loading branch information
KKQ-KKQ authored and paulfd committed Feb 13, 2024
1 parent 9d5f7bf commit cc33ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sfizz/Synth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ void Synth::renderBlock(AudioSpan<float> buffer) noexcept

{ // Main render block
ScopedTiming logger { callbackBreakdown.renderMethod, ScopedTiming::Operation::addToDuration };
tempMixSpan->fill(0.0f);

for (auto& voice : impl.voiceManager_) {
if (voice.isFree())
Expand Down Expand Up @@ -1197,6 +1196,7 @@ void Synth::renderBlock(AudioSpan<float> buffer) noexcept

const int numChannels = static_cast<int>(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);
Expand Down

0 comments on commit cc33ed1

Please sign in to comment.