From c09ce1892be40e3cb735b628de2b38bc8a9c21f7 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 15 Jan 2022 22:49:53 -0500 Subject: [PATCH] Amiga: limit sample length --- src/engine/platform/amiga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/platform/amiga.cpp b/src/engine/platform/amiga.cpp index fa8128df1..539bb6ac7 100644 --- a/src/engine/platform/amiga.cpp +++ b/src/engine/platform/amiga.cpp @@ -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 {