diff options
author | Chris Robinson <[email protected]> | 2018-09-11 19:05:49 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-09-11 19:05:49 -0700 |
commit | db452a19dafd30b72255529911087edfec0d43b7 (patch) | |
tree | 038614787fe131ad7070fb63bc5ffa9d6ca28dcd | |
parent | 99737469e2678a6169462c8488b6f6080c7857b6 (diff) |
The last reverb loop update doesn't need an aligned count.
-rw-r--r-- | Alc/effects/reverb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index a32b1de4..4459abf2 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -948,11 +948,9 @@ static ALvoid ALreverbState_update(ALreverbState *State, const ALCcontext *Conte props->Reverb.ReflectionsGain*gain, props->Reverb.LateReverbGain*gain, State); - /* Calculate the max update size from the smallest relevant delay, ensuring - * the update size is a multiple of 4 for SIMD. - */ + /* Calculate the max update size from the smallest relevant delay. */ State->MaxUpdate[1] = mini(MAX_UPDATE_SAMPLES, - mini(State->Early.Offset[0][1], State->Late.Offset[0][1])&~3 + mini(State->Early.Offset[0][1], State->Late.Offset[0][1]) ); /* Determine if delay-line cross-fading is required. TODO: Add some fuzz @@ -1420,6 +1418,11 @@ static ALvoid ALreverbState_process(ALreverbState *State, ALsizei SamplesToDo, c todo = mini(todo, State->MaxUpdate[0]); } todo = mini(todo, State->MaxUpdate[1]); + /* If this is not the final update, ensure the update size is a + * multiple of 4 for the SIMD mixers. + */ + if(todo < SamplesToDo-base) + todo &= ~3; /* Convert B-Format to A-Format for processing. */ memset(afmt, 0, sizeof(*afmt)*NUM_LINES); |