music.c
branchSDL-1.2
changeset 945 c606c85c8863
parent 944 22d93ad2d81a
child 1081 119300487b73
equal deleted inserted replaced
944:22d93ad2d81a 945:c606c85c8863
  1006 	while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) {
  1006 	while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) {
  1007 		SDL_UnlockAudio();
  1007 		SDL_UnlockAudio();
  1008 		SDL_Delay(100);
  1008 		SDL_Delay(100);
  1009 		SDL_LockAudio();
  1009 		SDL_LockAudio();
  1010 	}
  1010 	}
  1011 	if (loops == 1) {
  1011 	if (loops > 0) {
  1012 		/* Loop is the number of times to play the audio */
  1012 		/* Loop is the number of times to play the audio */
  1013 		loops = 0;
  1013 		loops--;
  1014 	}
  1014 	}
  1015 	music_loops = loops;
  1015 	music_loops = loops;
  1016 	retval = music_internal_play(music, position);
  1016 	retval = music_internal_play(music, position);
  1017 	music_active = (retval == 0);
  1017 	music_active = (retval == 0);
  1018 	SDL_UnlockAudio();
  1018 	SDL_UnlockAudio();