Skip to content

Commit 44d134e

Browse files
committed
Fix again
1 parent 846f2de commit 44d134e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/funkin/game/PlayState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,10 +1421,10 @@ class PlayState extends MusicBeatState
14211421
__vocalSyncTimer = 1;
14221422

14231423
final instTime = FlxG.sound.music.getActualTime();
1424-
var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 6;
1424+
var isOffsync:Bool = vocals.loaded && Math.abs(instTime - vocals.getActualTime()) > 12;
14251425
if (!isOffsync)
14261426
for (strumLine in strumLines.members)
1427-
if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 6))
1427+
if ((isOffsync = strumLine.vocals.loaded && Math.abs(instTime - strumLine.vocals.getActualTime()) > 12))
14281428
break;
14291429

14301430
if (isOffsync) resyncVocals();

source/lime/_internal/backend/native/NativeAudioSource.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,16 @@ class NativeAudioSource {
470470
var i:Int, source:NativeAudioSource, process:Int;
471471

472472
while ((i = Thread.readMessage(true)) != 0) {
473+
streamMutex.acquire();
473474
while (i-- > 0) {
474475
if ((source = streamSources[i]).parent.buffer == null) {
475476
source.stopStream();
476477
continue;
477478
}
478-
streamMutex.acquire();
479479
process = source.requestBuffers < STREAM_MIN_BUFFERS ? STREAM_MIN_BUFFERS - source.requestBuffers : 0;
480480
source.fillBuffers(STREAM_PROCESS_BUFFERS > process ? STREAM_PROCESS_BUFFERS : process);
481-
streamMutex.release();
482481
}
482+
streamMutex.release();
483483
}
484484

485485
threadRunning = false;

0 commit comments

Comments
 (0)