mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-27 13:04:21 +01:00
Snes9x - msu1: revert to start for invalid loop positions (#1039)
This commit is contained in:
parent
67af82ad0c
commit
3940616617
@ -262,7 +262,14 @@ void S9xMSU1Generate(size_t sample_count)
|
||||
{
|
||||
if (MSU1.MSU1_STATUS & AudioRepeating)
|
||||
{
|
||||
MSU1.MSU1_AUDIO_POS = audioLoopPos;
|
||||
if (audioLoopPos < MSU1.MSU1_AUDIO_POS)
|
||||
{
|
||||
MSU1.MSU1_AUDIO_POS = audioLoopPos;
|
||||
}
|
||||
else // if the loop point is invalid, revert to start
|
||||
{
|
||||
MSU1.MSU1_AUDIO_POS = 8;
|
||||
}
|
||||
REVERT_STREAM(audioStream, MSU1.MSU1_AUDIO_POS, 0);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user