mixer.c
changeset 539 e7c80564dda5
parent 518 8bc9b5fd2aae
child 560 0fc8dffb86c5
     1.1 --- a/mixer.c	Mon Jul 18 23:35:08 2011 -0700
     1.2 +++ b/mixer.c	Mon Jan 02 18:51:22 2012 -0800
     1.3 @@ -306,6 +306,7 @@
     1.4  			if ( mix_channel[i].expire > 0 && mix_channel[i].expire < sdl_ticks ) {
     1.5  				/* Expiration delay for that channel is reached */
     1.6  				mix_channel[i].playing = 0;
     1.7 +				mix_channel[i].looping = 0;
     1.8  				mix_channel[i].fading = MIX_NO_FADING;
     1.9  				mix_channel[i].expire = 0;
    1.10  				_Mix_channel_done_playing(i);
    1.11 @@ -315,6 +316,7 @@
    1.12  				    Mix_Volume(i, mix_channel[i].fade_volume_reset); /* Restore the volume */
    1.13  					if( mix_channel[i].fading == MIX_FADING_OUT ) {
    1.14  						mix_channel[i].playing = 0;
    1.15 +						mix_channel[i].looping = 0;
    1.16  						mix_channel[i].expire = 0;
    1.17  						_Mix_channel_done_playing(i);
    1.18  					}
    1.19 @@ -729,6 +731,7 @@
    1.20  			for ( i=0; i<num_channels; ++i ) {
    1.21  				if ( chunk == mix_channel[i].chunk ) {
    1.22  					mix_channel[i].playing = 0;
    1.23 +					mix_channel[i].looping = 0;
    1.24  				}
    1.25  			}
    1.26  		}
    1.27 @@ -988,7 +991,8 @@
    1.28  		SDL_LockAudio();
    1.29  		if (mix_channel[which].playing) {
    1.30  			_Mix_channel_done_playing(which);
    1.31 -		mix_channel[which].playing = 0;
    1.32 +			mix_channel[which].playing = 0;
    1.33 +			mix_channel[which].looping = 0;
    1.34  		}
    1.35  		mix_channel[which].expire = 0;
    1.36  		if(mix_channel[which].fading != MIX_NO_FADING) /* Restore volume */