From 7e24fa25a80f48e786e9fd6c24cc29e7eca94b52 Mon Sep 17 00:00:00 2001 From: dinkc64 <12570148+dinkc64@users.noreply.github.com> Date: Sat, 12 Apr 2014 06:10:53 +0000 Subject: [PATCH] Fix for sound clipping/crackles in the game Trojan and other games that use MSM5205 --- src/burn/snd/msm5205.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/burn/snd/msm5205.cpp b/src/burn/snd/msm5205.cpp index a1ba41d36..7f5de9a2b 100644 --- a/src/burn/snd/msm5205.cpp +++ b/src/burn/snd/msm5205.cpp @@ -205,8 +205,10 @@ void MSM5205Render(INT32 chip, INT16 *buffer, INT32 len) nRightSample = BURN_SND_CLIP(nRightSample); if (voice->bAdd) { - buffer[0] += nLeftSample; - buffer[1] += nRightSample; + //buffer[0] += nLeftSample; + //buffer[1] += nRightSample; + buffer[0] = BURN_SND_CLIP(buffer[0] + nLeftSample); + buffer[1] = BURN_SND_CLIP(buffer[1] + nRightSample); } else { buffer[0] = nLeftSample; buffer[1] = nRightSample;