Fixed some bugs in string handling

Cleaned up error message code, UTF-8 is used instead of UCS2
Added detection for MPEG Layer 3 audio for more informative errors.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401779
This commit is contained in:
Sam Lantinga 2006-05-11 21:03:23 +00:00
parent 369b7e44a3
commit b31509f7be
4 changed files with 58 additions and 134 deletions

View file

@ -478,6 +478,11 @@ SDL_AudioSpec * SDL_LoadWAV_RW (SDL_RWops *src, int freesrc,
}
IMA_ADPCM_encoded = 1;
break;
case MP3_CODE:
SDL_SetError("MPEG Layer 3 data not supported",
SDL_SwapLE16(format->encoding));
was_error = 1;
goto done;
default:
SDL_SetError("Unknown WAVE data format: 0x%.4x",
SDL_SwapLE16(format->encoding));