Fix for sound clipping/crackles in the game Trojan and other games that use MSM5205

This commit is contained in:
dinkc64 2014-04-12 06:10:53 +00:00
parent 9af98b4f22
commit 7e24fa25a8
1 changed files with 4 additions and 2 deletions

View File

@ -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;