aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-10-12 18:47:53 -0300
committerGitHub <noreply@github.com>2018-10-12 18:47:53 -0300
commitdd3cb33c9f43412617e2b2b76d9e2a4dec9a2a23 (patch)
tree93521085a6f7dcf7778721bd2001067836fde2c5
parentb2063be59747e65434b3b99a379566d640f05995 (diff)
Fix race condition on OpenALAudioOut (#448)
-rw-r--r--Ryujinx.Audio/OpenAL/OpenALAudioOut.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Ryujinx.Audio/OpenAL/OpenALAudioOut.cs b/Ryujinx.Audio/OpenAL/OpenALAudioOut.cs
index d7a2a777..9a75c568 100644
--- a/Ryujinx.Audio/OpenAL/OpenALAudioOut.cs
+++ b/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.