Просмотр исходного кода

sound channels: prevent negative volumes

trethaller 6 лет назад
Родитель
Сommit
4700e362b2
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      hxd/snd/Manager.hx

+ 1 - 0
hxd/snd/Manager.hx

@@ -452,6 +452,7 @@ class Manager {
 			var v = c.currentVolume * volume;
 			if (s.volume != v) {
 				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);