From 6c8c807781bea3355c244670a12a46bb2e9cd88f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 2 Oct 2021 18:47:04 -0700 Subject: [PATCH] VGMStream: Clear sample buffer, just in case --- Plugins/vgmstream/vgmstream/VGMDecoder.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plugins/vgmstream/vgmstream/VGMDecoder.m b/Plugins/vgmstream/vgmstream/VGMDecoder.m index 1cad67277..a3810df4d 100644 --- a/Plugins/vgmstream/vgmstream/VGMDecoder.m +++ b/Plugins/vgmstream/vgmstream/VGMDecoder.m @@ -338,6 +338,8 @@ static NSString* get_description_tag(const char* description, const char *tag, c if (frames_to_do > MAX_BUFFER_SAMPLES) frames_to_do = MAX_BUFFER_SAMPLES; + memset(sample_buffer, 0, frames_to_do * channels * sizeof(sbuf[0])); + render_vgmstream( sample_buffer, frames_to_do, stream ); framesRead += frames_to_do;