all repos — mgba @ eeb7060bda5ff99571603f9559aa48934a8cb857

mGBA Game Boy Advance Emulator

SDL: Fix blip audio buffer repeat while paused
Jeffrey Pfau jeffrey@endrift.com
Wed, 31 Dec 2014 14:51:52 -0800
commit

eeb7060bda5ff99571603f9559aa48934a8cb857

parent

c141063101955a837f0dc26884604443d8035d1d

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/sdl/sdl-audio.csrc/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 }