mixer.c
changeset 476 cae99938821c
parent 473 60b7e1c4f6b2
child 492 e9ae8f659fea
     1.1 --- a/mixer.c	Tue Nov 10 03:22:08 2009 +0000
     1.2 +++ b/mixer.c	Sat Nov 14 19:31:39 2009 +0000
     1.3 @@ -144,36 +144,36 @@
     1.4  {
     1.5  	int result = 0;
     1.6  
     1.7 -	if ((flags & MIX_INIT_FLAC) && !(initialized & MIX_INIT_FLAC)) {
     1.8 +	if (flags & MIX_INIT_FLAC) {
     1.9  #ifdef FLAC_MUSIC
    1.10 -		if (Mix_InitFLAC() == 0) {
    1.11 +		if ((initialized & MIX_INIT_FLAC) || Mix_InitFLAC() == 0) {
    1.12  			result |= MIX_INIT_FLAC;
    1.13  		}
    1.14  #else
    1.15  		Mix_SetError("Mixer not built with FLAC support");
    1.16  #endif
    1.17  	}
    1.18 -	if ((flags & MIX_INIT_MOD) && !(initialized & MIX_INIT_MOD)) {
    1.19 +	if (flags & MIX_INIT_MOD) {
    1.20  #ifdef MOD_MUSIC
    1.21 -		if (Mix_InitMOD() == 0) {
    1.22 +		if ((initialized & MIX_INIT_MOD) || Mix_InitMOD() == 0) {
    1.23  			result |= MIX_INIT_MOD;
    1.24  		}
    1.25  #else
    1.26  		Mix_SetError("Mixer not built with MOD support");
    1.27  #endif
    1.28  	}
    1.29 -	if ((flags & MIX_INIT_MP3) && !(initialized & MIX_INIT_MP3)) {
    1.30 +	if (flags & MIX_INIT_MP3) {
    1.31  #ifdef MP3_MUSIC
    1.32 -		if (Mix_InitMP3() == 0) {
    1.33 +		if ((initialized & MIX_INIT_MP3) || Mix_InitMP3() == 0) {
    1.34  			result |= MIX_INIT_MP3;
    1.35  		}
    1.36  #else
    1.37  		Mix_SetError("Mixer not built with MP3 support");
    1.38  #endif
    1.39  	}
    1.40 -	if ((flags & MIX_INIT_OGG) && !(initialized & MIX_INIT_OGG)) {
    1.41 +	if (flags & MIX_INIT_OGG) {
    1.42  #ifdef OGG_MUSIC
    1.43 -		if (Mix_InitOgg() == 0) {
    1.44 +		if ((initialized & MIX_INIT_OGG) || Mix_InitOgg() == 0) {
    1.45  			result |= MIX_INIT_OGG;
    1.46  		}
    1.47  #else