Skip to content

Commit b5ca472

Browse files
committed
Disable Streamed Audio for now, better late than broken
1 parent 4e557f9 commit b5ca472

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

source/funkin/menus/FreeplayState.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,15 @@ class FreeplayState extends MusicBeatState
261261
if (!disableAutoPlay && !songInstPlaying && (autoplayElapsed > timeUntilAutoplay)) {
262262
if (curPlayingInst != (curPlayingInst = Paths.inst(curSong.name, curDifficulties[curDifficulty], curSong.instSuffix))) {
263263
var streamed = false;
264-
if (Options.streamedMusic) {
264+
/*if (Options.streamedMusic) {
265265
var sound = Assets.getMusic(curPlayingInst, true, false);
266266
streamed = sound != null;
267267
268268
if (streamed && autoplayShouldPlay) {
269269
FlxG.sound.playMusic(sound, 0);
270270
Conductor.changeBPM(curSong.bpm, curSong.beatsPerMeasure, curSong.stepsPerBeat);
271271
}
272-
}
272+
}*/
273273

274274
if (!streamed) {
275275
var huh:Void->Void = function() {
@@ -290,7 +290,7 @@ class FreeplayState extends MusicBeatState
290290
}
291291
}
292292
songInstPlaying = true;
293-
if (disableAsyncLoading && !Options.streamedMusic) dontPlaySongThisFrame = true;
293+
if (disableAsyncLoading/* && !Options.streamedMusic*/) dontPlaySongThisFrame = true;
294294
}
295295
#end
296296

source/funkin/options/Options.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class Options
4343
public static var framerate:Int = 120;
4444
public static var gpuOnlyBitmaps:Bool = #if (mac || web) false #else true #end; // causes issues on mac and web
4545
public static var language = "en"; // default to english, Flags.DEFAULT_LANGUAGE should not modify this
46-
public static var streamedMusic:Bool = true;
47-
public static var streamedVocals:Bool = true;
46+
public static var streamedMusic:Bool = false;
47+
public static var streamedVocals:Bool = false;
4848
public static var quality:Int = 1;
4949
public static var allowConfigWarning:Bool = true;
5050
#if MODCHARTING_FEATURES

source/funkin/options/categories/GameplayOptions.hx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ class AdvancedGameplayOptions extends TreeMenuScreen {
6767
public function new() {
6868
super('optionsMenu.advanced', 'optionsTree.gameplay.advanced-desc', 'GameplayOptions.Advanced.');
6969

70-
add(new Checkbox(getNameID('streamedMusic'), getDescID('streamedMusic'), 'streamedMusic'));
71-
add(new Checkbox(getNameID('streamedVocals'), getDescID('streamedVocals'), 'streamedVocals'));
70+
// Remove locked whenever this PR from FunkinCrew is merged.
71+
// https://github.com/FunkinCrew/lime/pull/57
72+
for (checkbox in [
73+
new Checkbox(getNameID('streamedMusic'), getDescID('streamedMusic'), 'streamedMusic'),
74+
new Checkbox(getNameID('streamedVocals'), getDescID('streamedVocals'), 'streamedVocals')
75+
]) {
76+
checkbox.locked = true;
77+
add(checkbox);
78+
}
7279
}
7380
}

source/openfl/utils/Assets.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ class Assets
247247
var sound = cache.getSound(id);
248248
if (isValidSound(sound)) return sound;
249249
}
250-
#if (lime_vorbis && lime > "7.9.0" && !macro)
250+
/*#if (lime_vorbis && lime > "7.9.0" && !macro)
251251
if (Options.streamedMusic) {
252252
var bytes = getBytes(id);
253253
if (bytes == null) return null;
254254
// TODO: What if it is a WAV or non-Vorbis file?
255255
var vorbisFile = VorbisFile.fromBytes(bytes);
256256
if (vorbisFile != null) return Sound.fromAudioBuffer(AudioBuffer.fromVorbisFile(vorbisFile));
257257
}
258-
#end
258+
#end*/
259259
return if (staticFallback) getSound(id, useCache); else null;
260260
}
261261

0 commit comments

Comments
 (0)