Pārlūkot izejas kodu

added stopAllNotLooping

Nicolas Cannasse 6 gadi atpakaļ
vecāks
revīzija
cdaf39d20a
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      hxd/snd/Manager.hx

+ 9 - 0
hxd/snd/Manager.hx

@@ -151,6 +151,15 @@ class Manager {
 			channels.stop();
 	}
 
+	public function stopAllNotLooping() {
+		var c = channels;
+		while( c != null ) {
+			var n = c.next;
+			if( !c.loop ) c.stop();
+			c = n;
+		}
+	}
+
 	/**
 		Returns iterator with all active instances of a Sound at the call time.
 	**/