Mercurial > SDL_sound_CoreAudio
comparison decoders/mikmod.c @ 434:c09cf7c046cd
Prevent a clash between SDL_mixer and SDL_sound in mikmod initialization.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 21 Dec 2002 11:32:50 +0000 |
parents | 077cdba5d5f6 |
children | 3bd3d8da45c2 |
comparison
equal
deleted
inserted
replaced
433:f1c16afd9ebe | 434:c09cf7c046cd |
---|---|
210 | 210 |
211 | 211 |
212 static int MIKMOD_init(void) | 212 static int MIKMOD_init(void) |
213 { | 213 { |
214 MikMod_RegisterDriver(&drv_nos); | 214 MikMod_RegisterDriver(&drv_nos); |
215 MikMod_RegisterAllLoaders(); | 215 |
216 | 216 /* Quick and dirty hack to prevent an infinite loop problem |
217 * found when using SDL_mixer and SDL_sound together and | |
218 * both have MikMod compiled in. So, check to see if | |
219 * MikMod has already been registered first before calling | |
220 * RegisterAllLoaders() | |
221 */ | |
222 if(MikMod_InfoLoader() == NULL) | |
223 { | |
224 MikMod_RegisterAllLoaders(); | |
225 } | |
217 /* | 226 /* |
218 * Both DMODE_SOFT_MUSIC and DMODE_16BITS should be set by default, | 227 * Both DMODE_SOFT_MUSIC and DMODE_16BITS should be set by default, |
219 * so this is just for clarity. I haven't experimented with any of | 228 * so this is just for clarity. I haven't experimented with any of |
220 * the other flags. There are a few which are said to give better | 229 * the other flags. There are a few which are said to give better |
221 * sound quality. | 230 * sound quality. |