Mercurial > SDL_sound_CoreAudio
comparison decoders/smpeg.c @ 294:9828311da44b
Minor cleanups.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 17 Mar 2002 21:17:23 +0000 |
parents | 44a4730a1e6f |
children | ca43129df299 |
comparison
equal
deleted
inserted
replaced
293:ee6e1f8bfae9 | 294:9828311da44b |
---|---|
142 if (__Sound_strcasecmp(ext, "MP3") != 0) | 142 if (__Sound_strcasecmp(ext, "MP3") != 0) |
143 { | 143 { |
144 Uint8 mp3_magic[2]; | 144 Uint8 mp3_magic[2]; |
145 | 145 |
146 if (SDL_RWread(internal->rw, mp3_magic, sizeof (mp3_magic), 1) != 1) | 146 if (SDL_RWread(internal->rw, mp3_magic, sizeof (mp3_magic), 1) != 1) |
147 { | 147 BAIL_MACRO("MP3: Could not read MP3 magic.", 0); |
148 Sound_SetError("SMPEG: Could not read MP3 magic."); | |
149 return(0); | |
150 } /*if */ | |
151 | 148 |
152 if (mp3_magic[0] != 0xFF || (mp3_magic[1] & 0xF0) != 0xF0) | 149 if (mp3_magic[0] != 0xFF || (mp3_magic[1] & 0xF0) != 0xF0) |
153 { | 150 BAIL_MACRO("MP3: Not an MP3 stream.", 0); |
154 Sound_SetError("SMPEG: Not an MP3 stream."); | |
155 return(0); | |
156 } /* if */ | |
157 | 151 |
158 /* !!! FIXME: If the seek fails, we'll probably miss a frame */ | 152 /* !!! FIXME: If the seek fails, we'll probably miss a frame */ |
159 SDL_RWseek(internal->rw, -sizeof (mp3_magic), SEEK_CUR); | 153 SDL_RWseek(internal->rw, -sizeof (mp3_magic), SEEK_CUR); |
160 } /* if */ | 154 } /* if */ |
161 | 155 |