aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-05-03 19:13:20 -0700
committerChris Robinson <[email protected]>2020-05-03 19:13:20 -0700
commit58d953f6aa15469cc0237a49c1b9d8460b7885ea (patch)
tree1c90f027db0faa0efa3cbefaf86d277531de8337
parent15fd3da870d61e4c1fef8bcb008ea0ea1773eb71 (diff)
Clear buffers right before use
-rw-r--r--alc/effects/vmorpher.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp
index 4a09a3ad..0ffe23e6 100644
--- a/alc/effects/vmorpher.cpp
+++ b/alc/effects/vmorpher.cpp
@@ -259,19 +259,18 @@ void VmorpherState::process(const size_t samplesToDo, const al::span<const Float
auto chandata = std::addressof(mChans[0]);
for(const auto &input : samplesIn)
{
- std::fill_n(std::begin(mSampleBufferA), td, 0.0f);
- std::fill_n(std::begin(mSampleBufferB), td, 0.0f);
-
auto& vowelA = chandata->Formants[VOWEL_A_INDEX];
auto& vowelB = chandata->Formants[VOWEL_B_INDEX];
/* Process first vowel. */
+ std::fill_n(std::begin(mSampleBufferA), td, 0.0f);
vowelA[0].process(&input[base], mSampleBufferA, td);
vowelA[1].process(&input[base], mSampleBufferA, td);
vowelA[2].process(&input[base], mSampleBufferA, td);
vowelA[3].process(&input[base], mSampleBufferA, td);
/* Process second vowel. */
+ std::fill_n(std::begin(mSampleBufferB), td, 0.0f);
vowelB[0].process(&input[base], mSampleBufferB, td);
vowelB[1].process(&input[base], mSampleBufferB, td);
vowelB[2].process(&input[base], mSampleBufferB, td);