mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-04 08:24:19 +01:00
Snes9x - Restore MSU1_AUDIO_POS. (#844)
Snes9x: - Restore MSU1_AUDIO_POS. - Restore MSU1 playback position correctly.
This commit is contained in:
parent
ff33041e31
commit
cfda443d78
@ -416,6 +416,8 @@ void S9xMSU1PostLoadState(void)
|
|||||||
|
|
||||||
if (MSU1.MSU1_STATUS & AudioPlaying)
|
if (MSU1.MSU1_STATUS & AudioPlaying)
|
||||||
{
|
{
|
||||||
|
uint32 savedPosition = MSU1.MSU1_AUDIO_POS;
|
||||||
|
|
||||||
if (AudioOpen())
|
if (AudioOpen())
|
||||||
{
|
{
|
||||||
REVERT_STREAM(audioStream, 4, 0);
|
REVERT_STREAM(audioStream, 4, 0);
|
||||||
@ -424,6 +426,7 @@ void S9xMSU1PostLoadState(void)
|
|||||||
audioLoopPos <<= 2;
|
audioLoopPos <<= 2;
|
||||||
audioLoopPos += 8;
|
audioLoopPos += 8;
|
||||||
|
|
||||||
|
MSU1.MSU1_AUDIO_POS = savedPosition;
|
||||||
REVERT_STREAM(audioStream, MSU1.MSU1_AUDIO_POS, 0);
|
REVERT_STREAM(audioStream, MSU1.MSU1_AUDIO_POS, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user