mirror of https://github.com/snes9xgit/snes9x.git
msu1: revert to start for invalid loop positions (#778)
This commit is contained in:
parent
5c889d9488
commit
4b8d3c6c6b
7
msu1.cpp
7
msu1.cpp
|
@ -252,8 +252,15 @@ void S9xMSU1Generate(size_t sample_count)
|
|||
if (bytes_read >= 0)
|
||||
{
|
||||
if (MSU1.MSU1_STATUS & AudioRepeating)
|
||||
{
|
||||
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