From ca68aabbccc9e5e10f61ce5a9ea80afc109abf5a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 7 Aug 2022 09:57:53 +0100 Subject: [PATCH] idSlowChannel avoid messing with lowpass member which has virtual methods, so more `carefully` resetting. --- neo/sound/snd_emitter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neo/sound/snd_emitter.cpp b/neo/sound/snd_emitter.cpp index e0230b35..e788515c 100644 --- a/neo/sound/snd_emitter.cpp +++ b/neo/sound/snd_emitter.cpp @@ -1147,9 +1147,8 @@ idSlowChannel::Reset =================== */ void idSlowChannel::Reset() { - memset( this, 0, sizeof( *this ) ); - - this->chan = chan; + active = false; + chan = nullptr; curPosition.Set( 0 ); newPosition.Set( 0 ); @@ -1157,6 +1156,7 @@ void idSlowChannel::Reset() { curSampleOffset = -10000; newSampleOffset = -10000; + playbackState = 0; triggerOffset = 0; }