From 2e723683d0a1ef3672b707151456fa46a00d695b Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 2 Feb 2022 21:19:39 +0600 Subject: [PATCH] Clean speaker sound buffer on each init --- src/sound/snd_speaker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/snd_speaker.c b/src/sound/snd_speaker.c index d2ed41b82..027febf40 100644 --- a/src/sound/snd_speaker.c +++ b/src/sound/snd_speaker.c @@ -106,6 +106,7 @@ speaker_get_buffer(int32_t *buffer, int len, void *p) void speaker_init(void) { + memset(speaker_buffer, 0, sizeof(speaker_buffer)); sound_add_handler(speaker_get_buffer, NULL); speaker_mute = 0; }