SDL_sound *in* SDL_mixer

Corona688 tsm at
Mon Jan 13 14:57:56 EST 2003

Instead of rewriting SDL_mixer entirely, I'm trying to integrate
SDL_sound into it;  would be a royal pain to recreate the entire
framework and and all that, and besides, the current code and framework
*IS* very nice...  I'm currently having it use SDL_sound as a stream
source, the same way it uses the smpeg and ogg vorbis libraries.
Eventually, I'd like to have it replace ALL the decoders in
SDL_mixer...  The current code for them is not pretty, with multiple
#ifdefs for multiple switch statements; using pure SDL_sound should
eliminate a heck of a lot of mess.

Using SDL_mixer 1.2.4 release as a base...  results so far are quite
encouraging.  Disabling the other music types in SDL_mixer and enabling
only MUSIC_SDLS, it has been able to play OGGs, MODs, MP3s, AUs, SHNs,
WAVs, VOCs, and AIFFs.  Looping and fading in/out work properly.  My
binary of SDL_sound isn't configured for FLACs so I can't test those,
and it crashes on Timidity - perhaps because SDL_mixer currently links
Timidity as well.  Will compile SDL_mixer without timidity and see.

Next step will be to convert SDL_mixer's WAV loader to use SDL_sound
calls with total decoding...  hope it should be fairly simple, since
SDL_sound has it's own internal rate converters.  After that, will try
to simplify the SDL_mixer code quite abit, eliminating all music types
except SDL_sound and getting rid of those dog-awful #ifdefs and
music-type unions.

Comments?  Email me if you want the current project(VisualC 6 only)

More information about the sdlsound mailing list