From c7bc66466389b01d78d6ebc143c1dd4f1fbc7589 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 22 Sep 2019 00:19:59 -0500 Subject: [PATCH] Fix MP3 "AccurateSync" seeking see comment within. --- src/RageUtil/Sound/RageSoundReader_MP3.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/RageUtil/Sound/RageSoundReader_MP3.cpp b/src/RageUtil/Sound/RageSoundReader_MP3.cpp index fb9e27cb99..bfbdc6600c 100644 --- a/src/RageUtil/Sound/RageSoundReader_MP3.cpp +++ b/src/RageUtil/Sound/RageSoundReader_MP3.cpp @@ -955,6 +955,14 @@ RageSoundReader_MP3::SetPosition(int iFrame) if (ret <= 0) return ret; /* it set the error */ + // Documentation states that set_hard is meant for seeking forward. + // And we only use it when seeking accurately. + // By this logic, we can rewind without a care in the world. + // The result of doing this means we seek from the beginning of audio. + // ...And that means it's a fully accurate seek. Thank you and goodnight + // -poco + MADLIB_rewind(); + /* Align exactly. */ return SetPosition_hard(iFrame); } else {