From 06e83a1e94b233bd42384728a060474e64fb0c20 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 14 Sep 2003 09:09:43 +0000 Subject: [PATCH] Bugfix. Bug-unfix: reproduce a bug in the old code to maintain sync until I figure out a more sane way to handle it. (Still seeing sync differences ...) --- stepmania/src/RageSoundReader_MP3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index e7fc9d4a2b..6f6b23ecc9 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -601,11 +601,14 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_ if(mad->bitrate == -1) mad->bitrate = mad->Frame.header.bitrate; + SampleRate = mad->Frame.header.samplerate; mad->framelength = mad->Frame.header.duration; + this->Channels = 0; /* Since we've already decoded a frame, just synth it instead of rewinding * the stream. */ synth_output(); + this->Channels = MAD_NCHANNELS( &mad->Frame.header ); if(mad->length == -1) { @@ -615,8 +618,6 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_ mad->length = (int)(secs * 1000.f); } - SampleRate = mad->Frame.header.samplerate; - this->Channels = mad->Frame.header.mode == MAD_MODE_SINGLE_CHANNEL? 1:2; return OPEN_OK; }