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 ...)
This commit is contained in:
@@ -601,11 +601,14 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_
|
|||||||
if(mad->bitrate == -1)
|
if(mad->bitrate == -1)
|
||||||
mad->bitrate = mad->Frame.header.bitrate;
|
mad->bitrate = mad->Frame.header.bitrate;
|
||||||
|
|
||||||
|
SampleRate = mad->Frame.header.samplerate;
|
||||||
mad->framelength = mad->Frame.header.duration;
|
mad->framelength = mad->Frame.header.duration;
|
||||||
|
this->Channels = 0;
|
||||||
|
|
||||||
/* Since we've already decoded a frame, just synth it instead of rewinding
|
/* Since we've already decoded a frame, just synth it instead of rewinding
|
||||||
* the stream. */
|
* the stream. */
|
||||||
synth_output();
|
synth_output();
|
||||||
|
this->Channels = MAD_NCHANNELS( &mad->Frame.header );
|
||||||
|
|
||||||
if(mad->length == -1)
|
if(mad->length == -1)
|
||||||
{
|
{
|
||||||
@@ -615,8 +618,6 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_
|
|||||||
mad->length = (int)(secs * 1000.f);
|
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;
|
return OPEN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user