Internal function used to load the MP3.
| 241 | |
| 242 | // Internal function used to load the MP3. |
| 243 | ILboolean iLoadMp3Internal(void) |
| 244 | { |
| 245 | MP3HEAD Header; |
| 246 | ILuint Type; |
| 247 | |
| 248 | if (iCurImage == NULL) { |
| 249 | ilSetError(IL_ILLEGAL_OPERATION); |
| 250 | return IL_FALSE; |
| 251 | } |
| 252 | |
| 253 | if (!iGetMp3Head(&Header)) |
| 254 | return IL_FALSE; |
| 255 | if (!iCheckMp3(&Header)) |
| 256 | return IL_FALSE; |
| 257 | Type = iFindMp3Pic(&Header); |
| 258 | |
| 259 | switch (Type) |
| 260 | { |
| 261 | #ifndef IL_NO_JPG |
| 262 | case MP3_JPG: |
| 263 | return iLoadJpegInternal(); |
| 264 | #endif//IL_NO_JPG |
| 265 | |
| 266 | #ifndef IL_NO_PNG |
| 267 | case MP3_PNG: |
| 268 | return iLoadPngInternal(); |
| 269 | #endif//IL_NO_PNG |
| 270 | |
| 271 | // Either a picture was not found, or the MIME type was not recognized. |
| 272 | default: |
| 273 | ilSetError(IL_INVALID_FILE_HEADER); |
| 274 | } |
| 275 | |
| 276 | return IL_FALSE; |
| 277 | } |
| 278 | |
| 279 | #endif//IL_NO_MP3 |
| 280 |
no test coverage detected