add if (pBurnSoundOut) in *Frame()

This commit is contained in:
dinkc64 2014-07-09 02:58:26 +00:00
parent fd992bb0a2
commit 7384427450
2 changed files with 12 additions and 8 deletions

View File

@ -494,9 +494,11 @@ static INT32 DrvFrame()
if (interrupt_enable) ZetNmi();
ZetClose();
SN76496Update(0, pBurnSoundOut, nBurnSoundLen);
SN76496Update(1, pBurnSoundOut, nBurnSoundLen);
SN76496Update(2, pBurnSoundOut, nBurnSoundLen);
if (pBurnSoundOut) {
SN76496Update(0, pBurnSoundOut, nBurnSoundLen);
SN76496Update(1, pBurnSoundOut, nBurnSoundLen);
SN76496Update(2, pBurnSoundOut, nBurnSoundLen);
}
if (pBurnDraw) {
DrvDraw();

View File

@ -4984,11 +4984,13 @@ INT32 System1Frame()
if (i == 2 || i == 4 || i == 6 || i == 8) ZetRaiseIrq(0);
ZetClose();
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
SN76496Update(0, pSoundBuf, nSegmentLength);
SN76496Update(1, pSoundBuf, nSegmentLength);
nSoundBufferPos += nSegmentLength;
if (pBurnSoundOut) {
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
SN76496Update(0, pSoundBuf, nSegmentLength);
SN76496Update(1, pSoundBuf, nSegmentLength);
nSoundBufferPos += nSegmentLength;
}
}
// Make sure the buffer is entirely filled.