From ba58784e6891616129353993f0c89a1b0734cb8a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 9 Dec 2006 08:48:28 +0000 Subject: [PATCH] if not synthing, the buffer may have data used. mad->Timer is the time of the beginning of this MP3 frame; make sure the "skip data in the buffer" logic always works by putting the buffer back to the beginning of the MP3 frame --- stepmania/src/RageSoundReader_MP3.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index 42b929a807..0d366ad2e5 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -896,7 +896,14 @@ int RageSoundReader_MP3::SetPosition_hard( int iFrame ) if( mad_timer_compare(desired, next_frame_timer) < 0 ) { if( !synthed ) + { synth_output(); + } + else + { + mad->outleft += mad->outpos; + mad->outpos = 0; + } /* We just synthed data starting at mad->Timer, containing the desired offset. * Skip (desired - mad->Timer) worth of frames in the output to line up. */