Sam Lantinga - Sat Nov 14 11:22:14 PST 2009
authorSam Lantinga <slouken@libsdl.org>
Sat, 14 Nov 2009 19:31:39 +0000
changeset 476cae99938821c
parent 475 07da7472a2f0
child 477 c44842cb1d90
Sam Lantinga - Sat Nov 14 11:22:14 PST 2009
* Fixed bug loading multiple music files
CHANGES
mixer.c
     1.1 --- a/CHANGES	Tue Nov 10 03:22:08 2009 +0000
     1.2 +++ b/CHANGES	Sat Nov 14 19:31:39 2009 +0000
     1.3 @@ -1,3 +1,7 @@
     1.4 +1.2.11:
     1.5 +Sam Lantinga - Sat Nov 14 11:22:14 PST 2009
     1.6 + * Fixed bug loading multiple music files
     1.7 +
     1.8  1.2.10:
     1.9  Sam Lantinga - Sun Nov  8 08:34:48 PST 2009
    1.10   * Added Mix_Init()/Mix_Quit() to prevent constantly loading and unloading DLLs
     2.1 --- a/mixer.c	Tue Nov 10 03:22:08 2009 +0000
     2.2 +++ b/mixer.c	Sat Nov 14 19:31:39 2009 +0000
     2.3 @@ -144,36 +144,36 @@
     2.4  {
     2.5  	int result = 0;
     2.6  
     2.7 -	if ((flags & MIX_INIT_FLAC) && !(initialized & MIX_INIT_FLAC)) {
     2.8 +	if (flags & MIX_INIT_FLAC) {
     2.9  #ifdef FLAC_MUSIC
    2.10 -		if (Mix_InitFLAC() == 0) {
    2.11 +		if ((initialized & MIX_INIT_FLAC) || Mix_InitFLAC() == 0) {
    2.12  			result |= MIX_INIT_FLAC;
    2.13  		}
    2.14  #else
    2.15  		Mix_SetError("Mixer not built with FLAC support");
    2.16  #endif
    2.17  	}
    2.18 -	if ((flags & MIX_INIT_MOD) && !(initialized & MIX_INIT_MOD)) {
    2.19 +	if (flags & MIX_INIT_MOD) {
    2.20  #ifdef MOD_MUSIC
    2.21 -		if (Mix_InitMOD() == 0) {
    2.22 +		if ((initialized & MIX_INIT_MOD) || Mix_InitMOD() == 0) {
    2.23  			result |= MIX_INIT_MOD;
    2.24  		}
    2.25  #else
    2.26  		Mix_SetError("Mixer not built with MOD support");
    2.27  #endif
    2.28  	}
    2.29 -	if ((flags & MIX_INIT_MP3) && !(initialized & MIX_INIT_MP3)) {
    2.30 +	if (flags & MIX_INIT_MP3) {
    2.31  #ifdef MP3_MUSIC
    2.32 -		if (Mix_InitMP3() == 0) {
    2.33 +		if ((initialized & MIX_INIT_MP3) || Mix_InitMP3() == 0) {
    2.34  			result |= MIX_INIT_MP3;
    2.35  		}
    2.36  #else
    2.37  		Mix_SetError("Mixer not built with MP3 support");
    2.38  #endif
    2.39  	}
    2.40 -	if ((flags & MIX_INIT_OGG) && !(initialized & MIX_INIT_OGG)) {
    2.41 +	if (flags & MIX_INIT_OGG) {
    2.42  #ifdef OGG_MUSIC
    2.43 -		if (Mix_InitOgg() == 0) {
    2.44 +		if ((initialized & MIX_INIT_OGG) || Mix_InitOgg() == 0) {
    2.45  			result |= MIX_INIT_OGG;
    2.46  		}
    2.47  #else