diff --git a/source/funkin/audio/FunkinSound.hx b/source/funkin/audio/FunkinSound.hx index c70f195d2..7105a8735 100644 --- a/source/funkin/audio/FunkinSound.hx +++ b/source/funkin/audio/FunkinSound.hx @@ -543,11 +543,12 @@ class FunkinSound extends FlxSound implements ICloneable /** * 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(); }