Patch: SDL_mixer capability detection

While adding music playing routines using SDL_mixer to my project I
noticed that there is no way to detect which music formats SDL_mixer is
able to play. I don’t think this is good, because I expect getting bug
reports “the music is not working” from users when they have configured
SDL_mixer without MP3 support…

So I added a function to SDL_mixer which returns the music formats that
SDL_mixer can play. The patch is attached.

Martin Bickel
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/octet-stream
Size: 2078 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020120/81690171/attachment.obj

So I added a function to SDL_mixer which returns the music formats that
SDL_mixer can play. The patch is attached.

I would rather not have this as a bitmask, since SDL_sound (which is going
to become the decoding backend for SDL_mixer at some point) already
supports more than 32 formats (unless you count “mikmod” and “modplug” as
one “format” each, but I think that’s bad form). I think it’d be more
complex, but more robust to return a linked list or static array of
available formats as strings.

Look for Sound_AvailableDecoders here for info and example:
http://cvs.icculus.org/horde/chora/co.php/SDL_sound.h?rt=SDL_sound&r=1.15

–ryan.