From 58d953f6aa15469cc0237a49c1b9d8460b7885ea Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 May 2020 19:13:20 -0700 Subject: Clear buffers right before use --- alc/effects/vmorpher.cpp | 5 ++--- 1 file 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::spanFormants[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); -- cgit v1.2.3