Update FunkinSound.hx

This commit is contained in:
cyn
2024-08-23 20:17:10 -07:00
committed by GitHub
parent 9b483de1da
commit 00c7767f8a
+2 -1
View File
@@ -543,11 +543,12 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
/**
* Stop all sounds in the pool and allow them to be recycled.
*/
public static function stopAllAudio(musicToo:Bool = false):Void
public static function stopAllAudio(musicToo:Bool = false, persistToo:Bool = false):Void
{
for (sound in pool)
{
if (sound == null) continue;
if (!persistToo && sound.persist) continue;
if (!musicToo && sound == FlxG.sound.music) continue;
sound.destroy();
}