소스 검색

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.