aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/reverb.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-08 14:22:20 -0800
committerChris Robinson <[email protected]>2018-12-08 14:22:20 -0800
commitc9f5617f06503d951b3ed808cf07fb6362a7f8d1 (patch)
tree69fa576f29e7394aa76ebf08453c2d06d4bdbb6a /Alc/effects/reverb.cpp
parentfc8da0c16b34a964c637c721ff944e8e6a5f3277 (diff)
Avoid several uses of memset
Diffstat (limited to 'Alc/effects/reverb.cpp')
-rw-r--r--Alc/effects/reverb.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index ce7a9946..b5e6dd94 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -821,14 +821,12 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
*/
rot = GetTransformFromVector(ReflectionsPan);
MATRIX_MULT(transform, rot, A2B);
- memset(&State->mEarly.PanGain, 0, sizeof(State->mEarly.PanGain));
for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
ComputePanGains(&Device->FOAOut, transform.m[i], earlyGain,
State->mEarly.PanGain[i]);
rot = GetTransformFromVector(LateReverbPan);
MATRIX_MULT(transform, rot, A2B);
- memset(&State->mLate.PanGain, 0, sizeof(State->mLate.PanGain));
for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
ComputePanGains(&Device->FOAOut, transform.m[i], lateGain,
State->mLate.PanGain[i]);
@@ -1379,11 +1377,13 @@ void ReverbState::process(ALsizei SamplesToDo, const ALfloat (*RESTRICT SamplesI
todo &= ~3;
/* Convert B-Format to A-Format for processing. */
- memset(afmt, 0, sizeof(*afmt)*NUM_LINES);
for(c = 0;c < NUM_LINES;c++)
+ {
+ std::fill(std::begin(afmt[c]), std::end(afmt[c]), 0.0f);
MixRowSamples(afmt[c], B2A.m[c],
SamplesIn, MAX_EFFECT_CHANNELS, base, todo
);
+ }
/* Process the samples for reverb. */
for(c = 0;c < NUM_LINES;c++)