aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-10 13:30:20 -0700
committerChris Robinson <[email protected]>2018-09-10 13:30:20 -0700
commitb13396cce273c2154893976a9e33b87ae7e9d085 (patch)
treebb5368a6026dfe51182c4c291b1f02b8807a3a9f /Alc
parentd1f8b78dd418c1527bd26da9fbf6af1f3a430079 (diff)
Separate the delay line feeding from reading
Since it feeds a different line than it reads, the feeding could overwrite what's subsequently read.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/effects/reverb.c6
1 files 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);