diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 346e4626..cb8103d2 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -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(); diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index d126b371..16defb56 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -114,7 +114,9 @@ class StrumLine extends FlxTypedGroup { 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; } diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index b8483189..63e791f5 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -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; diff --git a/source/funkin/options/categories/AppearanceOptions.hx b/source/funkin/options/categories/AppearanceOptions.hx index 272074ad..1eb41258 100644 --- a/source/funkin/options/categories/AppearanceOptions.hx +++ b/source/funkin/options/categories/AppearanceOptions.hx @@ -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.",