diff --git a/src/engine/platform/gbaminmod.cpp b/src/engine/platform/gbaminmod.cpp index 3e573811d..30d9da7c0 100644 --- a/src/engine/platform/gbaminmod.cpp +++ b/src/engine/platform/gbaminmod.cpp @@ -44,9 +44,8 @@ const char** DivPlatformGBAMinMod::getRegisterSheet() { } void DivPlatformGBAMinMod::acquire(short** buf, size_t len) { - short sampL, sampR; size_t sampPos=mixBufReadPos&3; - bool newSamp=true; + bool newSamp=false; // cache channel registers that might change struct { uint64_t address; @@ -149,15 +148,15 @@ void DivPlatformGBAMinMod::acquire(short** buf, size_t len) { memset(mixBuf[mixBufPage+1],0,sizeof(mixBuf[mixBufPage+1])); // emulate buffer loss prevention and buffer copying sampsRendered+=mixBufReadPos; - mixBufOffset=(4-(mixBufReadPos&3))&3; - mixBufReadPos=0; - mixBufWritePos=mixBufOffset; + mixBufOffset=mixBufWritePos-mixBufReadPos; for (size_t j=0; j