From 2abcea118c4f871185db5e0f5bcec536fcd225fb Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 31 Aug 2022 00:51:08 -0500 Subject: [PATCH] WonderSwan: fix possible hang when seeking --- src/engine/platform/swan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/swan.cpp b/src/engine/platform/swan.cpp index 7f1e10a02..7ac266299 100644 --- a/src/engine/platform/swan.cpp +++ b/src/engine/platform/swan.cpp @@ -59,7 +59,8 @@ void DivPlatformSwan::acquire(short* bufL, short* bufR, size_t start, size_t len DivSample* s=parent->getSample(dacSample); if (s->samples<=0) { dacSample=-1; - continue; + dacPeriod=0; + break; } rWrite(0x09,(unsigned char)s->data8[dacPos++]+0x80); if (s->isLoopable() && dacPos>=s->getEndPosition()) {