SDL_mixer mikmod patch

When SDL_mixer calls MikMod_RegisterAllDrivers using it’s internally
compiled-in audio drivers, the only driver it registers is the nosound audio
driver. When it’s using an external mikmod library, it initializes any and
all drivers it has available, such as OSS, ESD, and so forth. Because of the
way SDL_mixer uses mikmod directly, this will often work, but will do silly
things like open the audio device twice – once by SDL, once by MikMod.
Worst case it will hang hard as MikMod attempts to open a busy audio device.

All it needs is the nosound driver for it to work, not ALL mikmod drivers.
The attached patch causes it to only initialize that one when using an
external mikmod library.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_mixer_mikmod.patch
Type: text/x-diff
Size: 339 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050422/9545daef/attachment.patch

Le Fri, 22 Apr 2005 21:07:49 -0600
Tyler Montbriand a ?crit:

When SDL_mixer calls MikMod_RegisterAllDrivers using it’s internally
compiled-in audio drivers, the only driver it registers is the nosound
audio driver. When it’s using an external mikmod library, it
initializes any and all drivers it has available, such as OSS, ESD,
and so forth. Because of the way SDL_mixer uses mikmod directly,
this will often work, but will do silly things like open the audio
device twice – once by SDL, once by MikMod. Worst case it will hang
hard as MikMod attempts to open a busy audio device.

All it needs is the nosound driver for it to work, not ALL mikmod
drivers. The attached patch causes it to only initialize that one
when using an external mikmod library.

I tried it and it worked for me. I was wondering why all my games using
SDL_mixer where hanging at startup. Thanks.–
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Sp?cialit?: D?veloppement, jeux

Thanks, your patch has been added to CVS.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment