Skip to content

Commit a71dd4f

Browse files
committed
Fixed potential race condition
1 parent 66e1a40 commit a71dd4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/raphimc/noteblocktool/audio/soundsystem/impl/MultithreadedJavaxSoundSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public synchronized String getStatusLine() {
102102

103103
@Override
104104
protected int[] render() {
105-
this.soundsToRender.addAll(this.playingSounds);
106105
this.syncLock.set(this.playingSounds.size());
106+
this.soundsToRender.addAll(this.playingSounds);
107107
while (this.syncLock.get() != 0 && !Thread.currentThread().isInterrupted()) {
108108
// Wait for all sounds to be rendered and merged
109109
}

0 commit comments

Comments
 (0)