An attempt to fix stutters for low-end computers
This commit is contained in:
@@ -552,7 +552,7 @@ class PlayState extends MusicBeatState
|
||||
@:noCompletion @:dox(hide) private var _endSongCalled:Bool = false;
|
||||
|
||||
@:dox(hide)
|
||||
var __vocalSyncTimer:Float = 0;
|
||||
var __vocalSyncTimer:Float = 1;
|
||||
|
||||
private function get_accuracy():Float {
|
||||
if (accuracyPressedNotes <= 0) return -1;
|
||||
@@ -1385,10 +1385,10 @@ class PlayState extends MusicBeatState
|
||||
__vocalSyncTimer = 1;
|
||||
|
||||
var instTime = FlxG.sound.music.getActualTime();
|
||||
var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 30;
|
||||
var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 100;
|
||||
if (!isOffsync) {
|
||||
for (strumLine in strumLines.members) {
|
||||
if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 30)) break;
|
||||
if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 100)) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ import lime.utils.ArrayBufferView;
|
||||
@:access(lime.media.AudioBuffer)
|
||||
@:access(lime.utils.ArrayBufferView)
|
||||
class NativeAudioSource {
|
||||
private static var STREAM_BUFFER_SAMPLES:Int = 0x1000;
|
||||
private static var STREAM_MAX_BUFFERS:Int = 32;
|
||||
private static var STREAM_BUFFER_SAMPLES:Int = 0x4000;
|
||||
private static var STREAM_MAX_BUFFERS:Int = 8;
|
||||
private static var STREAM_TIMER_FREQUENCY:Int = 100;
|
||||
private static var STREAM_BUFFER_FREQUENCY:Int = 6;
|
||||
private static var STREAM_BUFFER_FREQUENCY:Int = 3;
|
||||
|
||||
private var parent:AudioSource;
|
||||
private var disposed:Bool;
|
||||
|
||||
Reference in New Issue
Block a user