audio.c: fix memset error

This commit is contained in:
veclav talica 2024-07-08 22:37:58 +03:00
parent f6330bfaa6
commit 26a89dfe4f

View File

@ -338,7 +338,7 @@ void audio_callback(void *userdata, uint8_t *stream, int len) {
(void)userdata; (void)userdata;
/* prepare for mixing */ /* 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) { for (int i = 0; i < shlen(ctx.audio_channels); ++i) {
sanity_check_channel(&ctx.audio_channels[i].value); sanity_check_channel(&ctx.audio_channels[i].value);