Amiga: limit sample length

This commit is contained in:
tildearrow 2022-01-15 22:49:53 -05:00
parent 93f82637ad
commit c09ce1892b

View file

@ -19,7 +19,7 @@ void DivPlatformAmiga::acquire(short* bufL, short* bufR, size_t start, size_t le
} else {
chan[i].audDat=s->rendData[chan[i].audPos++]>>8;
}
if (chan[i].audPos>=s->rendLength) {
if (chan[i].audPos>=s->rendLength || chan[i].audPos>=131071) {
if (s->loopStart>=0 && s->loopStart<=(int)s->rendLength) {
chan[i].audPos=s->loopStart;
} else {