MikMod support

Ryan C. Gordon icculus at clutteredmind.org
Sat Sep 22 11:11:32 EDT 2001

> For a sound-related mailing list it has sure grown eerily quiet. :-)

I've actually been (*gasp!*) working for money for the past few days...the
tragedy of Open Source development is that Open Source developers still
need to eat.  :)

> These patches should hopefully add MikMod support to SDL_sound. I'm not
> sure how it will hold up to mixing several MOD files together, but for
> single files it passes the ever-popular "works for me" test.


I did a little reworking, here, though, since I don't like the idea of
having to include extra libraries like MikMod in the source tree. After
all, I'd rather benefit from future Mikmod fixes and enhancements without
having to keep the SDL_sound tree sync'd with Mikmod.org's tree.

Therefore, I ripped the SDL_RWops-specific code out of SDL_mixer, and
included it in mod.c. Now the code can be linked against whatever version
of Mikmod is installed on a user's system.

Also, I added two new methods to Sound_DecoderFunctions: init(), and
quit(), and moved the MikMod-specific code out of SDL_sound.c and into
mod.c. This was something I meant to do before, but now I had a reason to.

The patches look good, though...and strangely, test_sdlsound sounds
significantly better than the .MOD plugin I use for XMMS. I mean, it's a
REALLY noticable difference here, for whatever reason. That's cool.  :)

> It requires the mikmod subset that comes with SDL_mixer, preferably the
> current CVS snapshot because that one has a more recent version of
> MikMod than the latest stable release has. I'm not quite sure how to
> handle building it properly, so the Makefile patch should be considered
> a quick hack. I had to turn off -Werror because MikMod apparently isn't
> quite ANSI C...

(another good reason to keep the mikmod code separate.)

> Don't get your hopes up about mp3.patch.gz. I don't have a clue what's
> wrong with the MP3 decoder. This is just to keep it from greedily
> accepting just about any random file I threw at it.

Actually, that reduces my frustration with mp3.c by at least 50%.  :)


More information about the sdlsound mailing list