Explorar o código

Fix race condition on OpenALAudioOut (#448)

gdkchan %!s(int64=7) %!d(string=hai) anos
pai
achega
dd3cb33c9f
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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.