Skip to content

Commit 676ea49

Browse files
committed
1 parent 0b046ca commit 676ea49

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

assets

Submodule assets updated 108 files

source/funkin/audio/visualize/ABotVis.hx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,19 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
6060
}
6161
}
6262

63+
override public function destroy():Void
64+
{
65+
analyzer?.cleanup();
66+
super.destroy();
67+
}
68+
6369
public function initAnalyzer():Void
6470
{
6571
if (snd == null) return;
6672

73+
// cleanup previous instance
74+
analyzer?.cleanup();
75+
6776
@:privateAccess
6877
analyzer = new SpectralAnalyzer(snd._channel.__audioSource, BAR_COUNT, 0.1, 40);
6978
// A-Bot tuning...
@@ -86,6 +95,8 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
8695
public function dumpSound():Void
8796
{
8897
snd = null;
98+
99+
analyzer?.cleanup();
89100
analyzer = null;
90101
}
91102

source/funkin/ui/charSelect/CharSelectGF.hx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ class CharSelectGF extends FunkinSprite implements IBPMSyncedScriptedClass
2727
switchGF(Constants.DEFAULT_CHARACTER);
2828
}
2929

30+
override public function destroy():Void
31+
{
32+
analyzer?.cleanup();
33+
super.destroy();
34+
}
35+
3036
public function onStepHit(event:SongTimeScriptEvent):Void
3137
{
3238
}

0 commit comments

Comments
 (0)