Skip to content
Permalink
Browse files

Sam Lantinga - Sat Nov 14 11:22:14 PST 2009

 * Fixed bug loading multiple music files
  • Loading branch information
slouken committed Nov 14, 2009
1 parent a4e4356 commit 1b27673692228ceefd9a045bebabab869475c1d7
Showing with 12 additions and 8 deletions.
  1. +4 −0 CHANGES
  2. +8 −8 mixer.c
@@ -1,3 +1,7 @@
1.2.11:
Sam Lantinga - Sat Nov 14 11:22:14 PST 2009
* Fixed bug loading multiple music files

1.2.10:
Sam Lantinga - Sun Nov 8 08:34:48 PST 2009
* Added Mix_Init()/Mix_Quit() to prevent constantly loading and unloading DLLs
16 mixer.c
@@ -144,36 +144,36 @@ int Mix_Init(int flags)
{
int result = 0;

if ((flags & MIX_INIT_FLAC) && !(initialized & MIX_INIT_FLAC)) {
if (flags & MIX_INIT_FLAC) {
#ifdef FLAC_MUSIC
if (Mix_InitFLAC() == 0) {
if ((initialized & MIX_INIT_FLAC) || Mix_InitFLAC() == 0) {
result |= MIX_INIT_FLAC;
}
#else
Mix_SetError("Mixer not built with FLAC support");
#endif
}
if ((flags & MIX_INIT_MOD) && !(initialized & MIX_INIT_MOD)) {
if (flags & MIX_INIT_MOD) {
#ifdef MOD_MUSIC
if (Mix_InitMOD() == 0) {
if ((initialized & MIX_INIT_MOD) || Mix_InitMOD() == 0) {
result |= MIX_INIT_MOD;
}
#else
Mix_SetError("Mixer not built with MOD support");
#endif
}
if ((flags & MIX_INIT_MP3) && !(initialized & MIX_INIT_MP3)) {
if (flags & MIX_INIT_MP3) {
#ifdef MP3_MUSIC
if (Mix_InitMP3() == 0) {
if ((initialized & MIX_INIT_MP3) || Mix_InitMP3() == 0) {
result |= MIX_INIT_MP3;
}
#else
Mix_SetError("Mixer not built with MP3 support");
#endif
}
if ((flags & MIX_INIT_OGG) && !(initialized & MIX_INIT_OGG)) {
if (flags & MIX_INIT_OGG) {
#ifdef OGG_MUSIC
if (Mix_InitOgg() == 0) {
if ((initialized & MIX_INIT_OGG) || Mix_InitOgg() == 0) {
result |= MIX_INIT_OGG;
}
#else

0 comments on commit 1b27673

Please sign in to comment.