From b13396cce273c2154893976a9e33b87ae7e9d085 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 10 Sep 2018 13:30:20 -0700 Subject: [PATCH] Separate the delay line feeding from reading Since it feeds a different line than it reads, the feeding could overwrite what's subsequently read. --- Alc/effects/reverb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index c033e4f0..2a6aea35 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -1215,8 +1215,9 @@ static void EarlyReflection_Unfaded(ALreverbState *State, ALsizei offset, const for(i = 0;i < todo;i++) out[j][i] = DelayLineOut(&early_delay, early_feedb_tap++, j)*early_feedb_coeff + temps[j][i]; - DelayLineIn(&early_delay, offset, NUM_LINES-1-j, temps[j], todo); } + for(j = 0;j < NUM_LINES;j++) + DelayLineIn(&early_delay, offset, NUM_LINES-1-j, temps[j], todo); /* Also write the result back to the main delay line for the late reverb * stage to pick up at the appropriate time, appplying a scatter and @@ -1279,8 +1280,9 @@ static void EarlyReflection_Faded(ALreverbState *State, ALsizei offset, const AL ) + temps[j][i]; fadeCount += 1.0f; } - DelayLineIn(&early_delay, offset, NUM_LINES-1-j, temps[j], todo); } + for(j = 0;j < NUM_LINES;j++) + DelayLineIn(&early_delay, offset, NUM_LINES-1-j, temps[j], todo); late_feed_tap = offset - State->LateFeedTap; VectorScatterRevDelayIn(&main_delay, late_feed_tap, mixX, mixY, out, todo); -- 2.11.4.GIT