Browse Source

sound channels: prevent negative volumes

trethaller 6 years ago
parent
commit
69b7a473d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxd/snd/Manager.hx

+ 1 - 1
hxd/snd/Manager.hx

@@ -451,8 +451,8 @@ class Manager {
 
 			var v = c.currentVolume * volume;
 			if (s.volume != v) {
+				if (v < 0) v = 0;
 				s.volume = v;
-				if (s.volume < 0) s.volume = 0;
 				driver.setSourceVolume(s.handle, v);
 				#if hlopenal
 				if( v > 1 ) Sys.println("Could not set volume " + v + " on " + c.sound);