From c8b4e48120819486fa371e59a40676e6a44608d8 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Sun, 17 Dec 2023 12:28:27 +0100 Subject: [PATCH] fix loop --- src/util/bootSound/BootSoundReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/bootSound/BootSoundReader.cpp b/src/util/bootSound/BootSoundReader.cpp index 60a719ba..b2fb0654 100644 --- a/src/util/bootSound/BootSoundReader.cpp +++ b/src/util/bootSound/BootSoundReader.cpp @@ -21,10 +21,10 @@ sint16* BootSoundReader::getSamples() if (read % sizeof(sint16be) != 0) cemu_assert_suspicious(); - std::copy_n(bufferBE.begin(), read / sizeof(sint16be), buffer.begin() + totalRead); + std::copy_n(bufferBE.begin(), read / sizeof(sint16be), buffer.begin() + (totalRead / sizeof(sint16))); totalRead += read; if (totalRead < blockSize) - fsc_setFileSeek(bootsndFile, loopPoint * 4); + fsc_setFileSeek(bootsndFile, 8 + loopPoint * 4); } return buffer.data();