From c2b75d26d73e9394dd98f949709591a5197ae434 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 4 Oct 2022 01:20:26 -0500 Subject: [PATCH] SNES: loop injection --- src/engine/platform/snes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/platform/snes.cpp b/src/engine/platform/snes.cpp index fb278f2a0..8be1692e2 100644 --- a/src/engine/platform/snes.cpp +++ b/src/engine/platform/snes.cpp @@ -783,6 +783,10 @@ void DivPlatformSNES::renderSamples() { if (actualLength>0) { sampleOff[i]=memPos; memcpy(©OfSampleMem[memPos],s->dataBRR,actualLength); + // inject loop if needed + if (s->loop) { + copyOfSampleMem[memPos+actualLength-9]|=3; + } memPos+=actualLength; } if (actualLength