From 26a89dfe4f87af2a560efc50e50571099900b12c Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 8 Jul 2024 22:37:58 +0300 Subject: [PATCH] audio.c: fix memset error --- src/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio.c b/src/audio.c index 41d0599..9e9224c 100644 --- a/src/audio.c +++ b/src/audio.c @@ -338,7 +338,7 @@ void audio_callback(void *userdata, uint8_t *stream, int len) { (void)userdata; /* prepare for mixing */ - SDL_memset(stream, sizeof (uint16_t), len * ctx.audio_stream_channel_count); + SDL_memset(stream, 0, len); for (int i = 0; i < shlen(ctx.audio_channels); ++i) { sanity_check_channel(&ctx.audio_channels[i].value);