cleanup
This commit is contained in:
@@ -695,19 +695,18 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_
|
|||||||
mad->outpos = 0;
|
mad->outpos = 0;
|
||||||
|
|
||||||
ret = do_mad_frame_decode();
|
ret = do_mad_frame_decode();
|
||||||
if( ret == 0 )
|
switch(ret)
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
SetError( "Failed to read any data at all" );
|
SetError( "Failed to read any data at all" );
|
||||||
return OPEN_NO_MATCH;
|
return OPEN_NO_MATCH;
|
||||||
}
|
case -1:
|
||||||
if( ret == -1 )
|
SetError( GetError() + " (not an MP3 stream?)" );
|
||||||
{
|
|
||||||
SetError( ssprintf("%s (not an MP3 stream?)", GetError().c_str()) );
|
|
||||||
return OPEN_NO_MATCH;
|
return OPEN_NO_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store the bitrate of the frame we just got. */
|
/* Store the bitrate of the frame we just got. */
|
||||||
if(mad->bitrate == -1)
|
if( mad->bitrate == -1 ) /* might have been set by a Xing tag */
|
||||||
mad->bitrate = mad->Frame.header.bitrate;
|
mad->bitrate = mad->Frame.header.bitrate;
|
||||||
|
|
||||||
SampleRate = mad->Frame.header.samplerate;
|
SampleRate = mad->Frame.header.samplerate;
|
||||||
|
|||||||
Reference in New Issue
Block a user