Add check for no sound
authornemo
Mon, 22 Aug 2011 10:54:53 -0400
changeset 5652 28a8e14a4b8d
parent 5651 a7de68f4f87f
child 5653 fa58dea8a9ad
Add check for no sound
hedgewars/uSound.pas
--- a/hedgewars/uSound.pas	Mon Aug 22 16:20:28 2011 +0200
+++ b/hedgewars/uSound.pas	Mon Aug 22 10:54:53 2011 -0400
@@ -300,7 +300,7 @@
 procedure PlayNextVoice;
 var i : LongInt;
 begin
-    if (LastVoice.snd <> sndNone) and (lastChan[LastVoice.snd] <> -1) and (Mix_Playing(lastChan[LastVoice.snd]) <> 0) then exit;
+    if (not isSoundEnabled) or fastUntilLag or (LastVoice.snd = sndNone) or (lastChan[LastVoice.snd] = -1) or (Mix_Playing(lastChan[LastVoice.snd]) = 0) then exit;
     i:= 0;
     while (i<8) and (VoiceList[i].snd = sndNone) do inc(i);