Streamed Vocals?

This commit is contained in:
Ralty
2025-07-12 02:34:55 +07:00
parent 5187f4a438
commit 96d60cfe8c
4 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -1065,7 +1065,7 @@ class PlayState extends MusicBeatState
FlxG.sound.setMusic(inst = FlxG.sound.load(Assets.getMusic(Paths.inst(SONG.meta.name, difficulty))));
if (SONG.meta.needsVoices != false && Assets.exists(Paths.voices(SONG.meta.name, difficulty))) // null or true
vocals = FlxG.sound.load(Paths.voices(SONG.meta.name, difficulty));
vocals = FlxG.sound.load(Options.streamedVocals ? Assets.getMusic(Paths.voices(SONG.meta.name, difficulty)) : Paths.voices(SONG.meta.name, difficulty));
else
vocals = new FlxSound();
+3 -1
View File
@@ -114,7 +114,9 @@ class StrumLine extends FlxTypedGroup<Strum> {
this.opponentSide = opponentSide;
this.controls = controls;
this.notes = new NoteGroup();
vocals = vocalPrefix != "" ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, vocalPrefix)) : new FlxSound();
var v = Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, vocalPrefix);
vocals = vocalPrefix != "" ? FlxG.sound.load(Options.streamedVocals ? Assets.getMusic(v) : v) : new FlxSound();
vocals.persist = false;
}
+1
View File
@@ -41,6 +41,7 @@ class Options
public static var framerate:Int = 120;
public static var gpuOnlyBitmaps:Bool = #if (mac || web) false #else true #end; // causes issues on mac and web
public static var streamedMusic:Bool = true;
public static var streamedVocals:Bool = true;
public static var lastLoadedMod:String = null;
@@ -47,6 +47,10 @@ class AppearanceOptions extends OptionsScreen {
"Streamed Music",
"If checked, only musics will have streamed audio, ALSO freeing a LOT of memory with the downside of higher cpu usage if more audio are being streamed at once (EXPERIMENTAL). Turning this off will consume a lot of memory, especially on longer songs. If you aren't sure, leave this on.",
"streamedMusic"));
add(new Checkbox(
"Streamed Vocals",
"If checked, vocals will also be streamed if Streamed Music is checked, will impact the performance if the song uses alot of vocals (EXPERIMENTAL). If you aren't sure, leave this on.",
"streamedVocals"));
add(new Checkbox(
"Auto Pause",
"If checked, switching windows will pause the game.",