diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 0282a465..cac4e5c8 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1421,10 +1421,10 @@ class PlayState extends MusicBeatState __vocalSyncTimer = 1; final instTime = FlxG.sound.music.getActualTime(); - var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 6; + var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 12; if (!isOffsync) for (strumLine in strumLines.members) - if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 6)) + if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 12)) break; if (isOffsync) resyncVocals(); diff --git a/source/lime/_internal/backend/native/NativeAudioSource.hx b/source/lime/_internal/backend/native/NativeAudioSource.hx index 30f9fbb2..2b602dc0 100644 --- a/source/lime/_internal/backend/native/NativeAudioSource.hx +++ b/source/lime/_internal/backend/native/NativeAudioSource.hx @@ -470,16 +470,16 @@ class NativeAudioSource { var i:Int, source:NativeAudioSource, process:Int; while ((i = Thread.readMessage(true)) != 0) { + streamMutex.acquire(); while (i-- > 0) { if ((source = streamSources[i]).parent.buffer == null) { source.stopStream(); continue; } - streamMutex.acquire(); process = source.requestBuffers < STREAM_MIN_BUFFERS ? STREAM_MIN_BUFFERS - source.requestBuffers : 0; source.fillBuffers(STREAM_PROCESS_BUFFERS > process ? STREAM_PROCESS_BUFFERS : process); - streamMutex.release(); } + streamMutex.release(); } threadRunning = false;