missing if (pBSO) for gal_run and d_psikyo4

This commit is contained in:
dinkc64 2014-07-09 03:53:39 +00:00
parent a9defb96b3
commit 5967fded7d
2 changed files with 21 additions and 15 deletions

View File

@ -1773,14 +1773,16 @@ INT32 GalFrame()
} }
if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496 || GalSoundType == GAL_SOUND_HARDWARE_TYPE_HEXPOOLASN76496) { if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496 || GalSoundType == GAL_SOUND_HARDWARE_TYPE_HEXPOOLASN76496) {
INT32 nSegmentLength = nBurnSoundLen / nInterleave; if (pBurnSoundOut) {
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1); INT32 nSegmentLength = nBurnSoundLen / nInterleave;
SN76496Update(0, pSoundBuf, nSegmentLength); INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496) { SN76496Update(0, pSoundBuf, nSegmentLength);
SN76496Update(1, pSoundBuf, nSegmentLength); if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496) {
SN76496Update(2, pSoundBuf, nSegmentLength); SN76496Update(1, pSoundBuf, nSegmentLength);
SN76496Update(2, pSoundBuf, nSegmentLength);
}
nSoundBufferPos += nSegmentLength;
} }
nSoundBufferPos += nSegmentLength;
} }
} }
@ -1845,14 +1847,16 @@ INT32 GalFrame()
} }
if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496 || GalSoundType == GAL_SOUND_HARDWARE_TYPE_HEXPOOLASN76496) { if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496 || GalSoundType == GAL_SOUND_HARDWARE_TYPE_HEXPOOLASN76496) {
INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos; if (pBurnSoundOut) {
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1); INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
if (nSegmentLength) { if (nSegmentLength) {
SN76496Update(0, pSoundBuf, nSegmentLength); SN76496Update(0, pSoundBuf, nSegmentLength);
if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496) { if (GalSoundType == GAL_SOUND_HARDWARE_TYPE_RACKNROLSN76496) {
SN76496Update(1, pSoundBuf, nSegmentLength); SN76496Update(1, pSoundBuf, nSegmentLength);
SN76496Update(2, pSoundBuf, nSegmentLength); SN76496Update(2, pSoundBuf, nSegmentLength);
}
} }
} }
} }

View File

@ -922,7 +922,9 @@ static INT32 DrvFrame()
Sh2SetIRQLine(4, SH2_IRQSTATUS_AUTO); Sh2SetIRQLine(4, SH2_IRQSTATUS_AUTO);
Sh2Run(0); Sh2Run(0);
Sh2SetIRQLine(4, SH2_IRQSTATUS_NONE); Sh2SetIRQLine(4, SH2_IRQSTATUS_NONE);
BurnYMF278BUpdate(nBurnSoundLen); if (pBurnSoundOut) {
BurnYMF278BUpdate(nBurnSoundLen);
}
if (pBurnDraw) { if (pBurnDraw) {
DrvDraw(); DrvDraw();