diff --git a/source/funkin/audio/FunkinSound.hx b/source/funkin/audio/FunkinSound.hx index 54e125ec5..aa0b4b00a 100644 --- a/source/funkin/audio/FunkinSound.hx +++ b/source/funkin/audio/FunkinSound.hx @@ -550,11 +550,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(); }