Snes9x - Restore MSU1_AUDIO_POS. (#844)

Snes9x:
- Restore MSU1_AUDIO_POS.
- Restore MSU1 playback position correctly.
This commit is contained in:
bladeoner 2019-04-17 21:31:26 +02:00 committed by dborth
parent ff33041e31
commit cfda443d78

View File

@ -416,6 +416,8 @@ void S9xMSU1PostLoadState(void)
if (MSU1.MSU1_STATUS & AudioPlaying)
{
uint32 savedPosition = MSU1.MSU1_AUDIO_POS;
if (AudioOpen())
{
REVERT_STREAM(audioStream, 4, 0);
@ -424,6 +426,7 @@ void S9xMSU1PostLoadState(void)
audioLoopPos <<= 2;
audioLoopPos += 8;
MSU1.MSU1_AUDIO_POS = savedPosition;
REVERT_STREAM(audioStream, MSU1.MSU1_AUDIO_POS, 0);
}
else