SDL: Fix blip audio buffer repeat while paused
Jeffrey Pfau jeffrey@endrift.com
Wed, 31 Dec 2014 14:51:52 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/platform/sdl/sdl-audio.c
→
src/platform/sdl/sdl-audio.c
@@ -97,7 +97,7 @@ blip_read_samples(audioContext->thread->gba->audio.right, ((short*) data) + 1, available, 1);
} GBASyncConsumeAudio(&audioContext->thread->sync); if (available < len) { - memset(((short*) data) + audioContext->obtainedSpec.channels * available, 0, len - available); + memset(((short*) data) + audioContext->obtainedSpec.channels * available, 0, (len - available) * audioContext->obtainedSpec.channels * sizeof(short)); } #endif }