Use -1 to clear all channels before playing victory sound
authornemo
Sun, 13 Nov 2011 14:33:14 -0500
changeset 6363 d812246272e8
parent 6362 ceacd1b61833
child 6364 c6adb60239f4
Use -1 to clear all channels before playing victory sound
hedgewars/uSound.pas
--- a/hedgewars/uSound.pas	Sun Nov 13 19:32:42 2011 +0100
+++ b/hedgewars/uSound.pas	Sun Nov 13 14:33:14 2011 -0500
@@ -307,7 +307,7 @@
     if (not isSoundEnabled) or fastUntilLag or ((LastVoice.snd = snd) and  (LastVoice.voicepack = voicepack)) then exit;
     if (snd = sndVictory) or (snd = sndFlawless) then
         begin
-        for i:= 1 to Succ(chanTPU) do StopSound(i);
+        Mix_HaltChannel(-1);
         for i:= 0 to 7 do VoiceList[i].snd:= sndNone;
         LastVoice.snd:= sndNone;
         end;