diff options
author | Chris Robinson <[email protected]> | 2016-10-26 22:12:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-10-26 22:12:48 -0700 |
commit | 2668da696c0fb18668977e5e6f9aeed56f1abf29 (patch) | |
tree | 5883ba62d31884daef435a29c3774c7361e800df /Alc/effects | |
parent | 16ed117d71aee8e0ee02b6e2873dacae15056d04 (diff) |
Round the early and late delay tap sample offsets
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/reverb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index f2d5b718..54587f7e 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -676,20 +676,20 @@ static ALvoid UpdateDelayLine(ALfloat earlyDelay, ALfloat lateDelay, ALfloat den * * for index = 1...max_lines */ - State->EarlyDelayTap[0] = fastf2u(earlyDelay * frequency); + State->EarlyDelayTap[0] = fastf2u(earlyDelay*frequency + 0.5f); for(i = 1;i < 4;i++) { length = (DECO_FRACTION * powf(DECO_MULTIPLIER, (ALfloat)i-1.0f)) * EARLY_LINE_LENGTH[0]; - State->EarlyDelayTap[i] = fastf2u(length * frequency) + State->EarlyDelayTap[0]; + State->EarlyDelayTap[i] = fastf2u(length*frequency + 0.5f) + State->EarlyDelayTap[0]; } - State->LateDelayTap[0] = fastf2u((earlyDelay + lateDelay) * frequency); + State->LateDelayTap[0] = fastf2u((earlyDelay + lateDelay)*frequency + 0.5f); for(i = 1;i < 4;i++) { length = (DECO_FRACTION * powf(DECO_MULTIPLIER, (ALfloat)i-1.0f)) * LATE_LINE_LENGTH[0] * (1.0f + (density * LATE_LINE_MULTIPLIER)); - State->LateDelayTap[i] = fastf2u(length * frequency) + State->LateDelayTap[0]; + State->LateDelayTap[i] = fastf2u(length*frequency + 0.5f) + State->LateDelayTap[0]; } } |