From cedff0327410872fb6c02a18477cd8434da8b3b3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 3 Oct 2003 21:57:03 +0000 Subject: [PATCH] cleanup --- stepmania/src/RageSoundReader_MP3.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index 9486b3c876..d1c49f3559 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -695,19 +695,18 @@ SoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( CString filename_ mad->outpos = 0; ret = do_mad_frame_decode(); - if( ret == 0 ) + switch(ret) { + case 0: SetError( "Failed to read any data at all" ); return OPEN_NO_MATCH; - } - if( ret == -1 ) - { - SetError( ssprintf("%s (not an MP3 stream?)", GetError().c_str()) ); + case -1: + SetError( GetError() + " (not an MP3 stream?)" ); return OPEN_NO_MATCH; } /* 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; SampleRate = mad->Frame.header.samplerate;