From 0bd9c4e032a21dafd7f706a85b4255359e46c5c4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 29 Nov 2006 20:56:32 +0000 Subject: [PATCH] mad->Timer is the beginning of the frame; advance by outpos to find the current source frame --- stepmania/src/RageSoundReader_MP3.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index 6a759d4c3d..3e9b91b89c 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -1003,6 +1003,9 @@ int RageSoundReader_MP3::GetNextSourceFrame() const { mad_timer_t now( mad->Timer ); mad_timer_multiply( &now, mad->Frame.header.samplerate ); + + int iFrame = mad->outpos / (sizeof(int16_t) * this->Channels); + now.seconds += iFrame; return now.seconds; }