hedgewars/uSound.pas
changeset 6990 40e5af28d026
parent 6898 344b0dbd9690
child 7021 0c75512a8920
--- a/hedgewars/uSound.pas	Wed May 02 11:28:38 2012 +0200
+++ b/hedgewars/uSound.pas	Wed May 02 10:53:13 2012 +0100
@@ -468,8 +468,9 @@
 
 function ChangeVolume(voldelta: LongInt): LongInt;
 begin
+    ChangeVolume:= 0;
     if not isSoundEnabled then
-        exit(0);
+        exit;
 
     inc(Volume, voldelta);
     if Volume < 0 then
@@ -483,8 +484,8 @@
 
 procedure DampenAudio;
 begin
-previousVolume:= Volume;
-ChangeVolume(-Volume * 7 div 9);
+    previousVolume:= Volume;
+    ChangeVolume(-Volume * 7 div 9);
 end;
 
 procedure UndampenAudio;