From 1a424464c94608d44d44914b7a164b4e875feab0 Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 27 May 2019 04:05:38 +0300 Subject: [PATCH] fix reverberation echo while level changing --- src/sound.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sound.h b/src/sound.h index b7631c7..0897a62 100644 --- a/src/sound.h +++ b/src/sound.h @@ -107,6 +107,10 @@ namespace Sound { panCoeff[i][1] = panCoeff[i + 1][1] = 1; } + clear(); + } + + void clear() { memset(output, 0, sizeof(output)); memset(df, 0, sizeof(df)); memset(af, 0, sizeof(af)); @@ -1111,6 +1115,7 @@ namespace Sound { void stopAll() { OS_LOCK(lock); + reverb.clear(); for (int i = 0; i < channelsCount; i++) delete channels[i];