# HG changeset patch
# User nemo
# Date 1314024893 14400
# Node ID 28a8e14a4b8d4d29f5df73e958a10723d3127a7f
# Parent  a7de68f4f87f7da4e38a04bcfa5bffe6d54d6b90
Add check for no sound

diff -r a7de68f4f87f -r 28a8e14a4b8d 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);