diff --git a/assets b/assets index 8013845e3..485243fdd 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 8013845e331015b40c4cc35230f6d02bd2148d52 +Subproject commit 485243fdd44acbc4db6a97ec7bf10a8b18350be9 diff --git a/source/funkin/audio/FunkinSound.hx b/source/funkin/audio/FunkinSound.hx index 6520ff27f..0df290feb 100644 --- a/source/funkin/audio/FunkinSound.hx +++ b/source/funkin/audio/FunkinSound.hx @@ -51,6 +51,11 @@ class FunkinSound extends FlxSound implements ICloneable */ static var pool(default, null):FlxTypedGroup = new FlxTypedGroup(); + /** + * Calculate the current time of the sound. + * NOTE: You need to `add()` the sound to the scene for `update()` to increment the time. + */ + // public var muted(default, set):Bool = false; function set_muted(value:Bool):Bool @@ -394,8 +399,6 @@ class FunkinSound extends FlxSound implements ICloneable // Call onLoad() because the sound already loaded if (onLoad != null && sound._sound != null) onLoad(); - FlxG.sound.list.remove(FlxG.sound.music); - return sound; } diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 6dc41e3f9..fd6463bb1 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2944,10 +2944,7 @@ class PlayState extends MusicBeatSubState if (overrideMusic) { // Stop the music. Do NOT destroy it, something still references it! - if (FlxG.sound.music != null) - { - FlxG.sound.music.pause(); - } + if (FlxG.sound.music != null) FlxG.sound.music.pause(); if (vocals != null) { vocals.pause(); @@ -2957,10 +2954,7 @@ class PlayState extends MusicBeatSubState else { // Stop and destroy the music. - if (FlxG.sound.music != null) - { - FlxG.sound.music.pause(); - } + if (FlxG.sound.music != null) FlxG.sound.music.pause(); if (vocals != null) { vocals.destroy();