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
9
msu1.cpp
9
msu1.cpp
|
@ -253,7 +253,14 @@ void S9xMSU1Generate(size_t sample_count)
|
||||||
{
|
{
|
||||||
if (MSU1.MSU1_STATUS & AudioRepeating)
|
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);
|
REVERT_STREAM(audioStream, MSU1.MSU1_AUDIO_POS, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue