clipping distortion fix for Scramble and Super Cobra
This commit is contained in:
parent
bda424ad3e
commit
128e049b5d
|
@ -62,8 +62,9 @@ void filter_rc_update(INT32 num, INT16 *src, INT16 *pSoundBuf, INT32 length)
|
|||
nRightSample = BURN_SND_CLIP(nRightSample);
|
||||
|
||||
if (ptr->add_signal) {
|
||||
pSoundBuf[0] += nLeftSample;
|
||||
pSoundBuf[1] += nRightSample;
|
||||
// March 28, 2014: Clipping is still possible when using pSoundBuf[x] += n[l/r]Sample; - dink
|
||||
pSoundBuf[0] = BURN_SND_CLIP(pSoundBuf[0] + nLeftSample);
|
||||
pSoundBuf[1] = BURN_SND_CLIP(pSoundBuf[1] + nRightSample);
|
||||
} else {
|
||||
pSoundBuf[0] = nLeftSample;
|
||||
pSoundBuf[1] = nRightSample;
|
||||
|
@ -92,8 +93,9 @@ void filter_rc_update(INT32 num, INT16 *src, INT16 *pSoundBuf, INT32 length)
|
|||
nRightSample = BURN_SND_CLIP(nRightSample);
|
||||
|
||||
if (ptr->add_signal) {
|
||||
pSoundBuf[0] += nLeftSample;
|
||||
pSoundBuf[1] += nRightSample;
|
||||
// March 28, 2014: Clipping is still possible when using pSoundBuf[x] += n[l/r]Sample; - dink
|
||||
pSoundBuf[0] = BURN_SND_CLIP(pSoundBuf[0] + nLeftSample);
|
||||
pSoundBuf[1] = BURN_SND_CLIP(pSoundBuf[1] + nRightSample);
|
||||
} else {
|
||||
pSoundBuf[0] = nLeftSample;
|
||||
pSoundBuf[1] = nRightSample;
|
||||
|
|
Loading…
Reference in New Issue