aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-05-12 04:46:15 -0700
committerChris Robinson <[email protected]>2020-05-12 04:46:15 -0700
commitad95cb6312dc2a3ac458f79af4f50104bcb01708 (patch)
treef98107b931abf6955d747eb77710c33cc4bc0092
parent2f8f829772305c47a495f7197a44a836b1e3f7cb (diff)
Clear the whole buffer
-rw-r--r--alc/alu.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 40fb12f0..b2e287a9 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1728,7 +1728,7 @@ void ProcessContexts(ALCdevice *device, const ALuint SamplesToDo)
for(ALeffectslot *slot : auxslots)
{
for(auto &buffer : slot->MixBuffer)
- std::fill_n(buffer.begin(), SamplesToDo, 0.0f);
+ buffer.fill(0.0f);
}
/* Process voices that have a playing source. */
@@ -2018,9 +2018,7 @@ void aluMixData(ALCdevice *device, void *OutBuffer, const ALuint NumSamples,
/* Clear main mixing buffers. */
std::for_each(device->MixBuffer.begin(), device->MixBuffer.end(),
- [SamplesToDo](FloatBufferLine &buffer) -> void
- { std::fill_n(buffer.begin(), SamplesToDo, 0.0f); }
- );
+ [](FloatBufferLine &buffer) -> void { buffer.fill(0.0f); });
/* Increment the mix count at the start (lsb should now be 1). */
IncrementRef(device->MixCount);