瀏覽代碼

Fix race condition on OpenALAudioOut (#448)

gdkchan 7 年之前
父節點
當前提交
dd3cb33c9f
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Ryujinx.Audio/OpenAL/OpenALAudioOut.cs

+ 4 - 1
Ryujinx.Audio/OpenAL/OpenALAudioOut.cs

@@ -182,7 +182,10 @@ namespace Ryujinx.Audio.OpenAL
             {
                 foreach (Track Td in Tracks.Values)
                 {
-                    Td.CallReleaseCallbackIfNeeded();
+                    lock (Td)
+                    {
+                        Td.CallReleaseCallbackIfNeeded();
+                    }
                 }
 
                 //If it's not slept it will waste cycles.