aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-08-04 15:28:33 -0300
committerGitHub <noreply@github.com>2021-08-04 15:28:33 -0300
commita27986c31167d8ce60efcee7e901da241f63ed08 (patch)
treeac84a8d686b82d9114a4c609ff3d0ae8cea52768 /Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs
parent06cd3abe6c5a8d86bf2473089c489415ce8c4573 (diff)
Make audio disposal thread safe on all 3 backends (#2527)
* Make audio disposal thread safe on all 3 backends * Make OpenAL more consistent with the other backends * Remove Window.Cursor = null, and change dummy TValue to byte
Diffstat (limited to 'Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs')
-rw-r--r--Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs b/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs
index f0227bf8..f0c0f498 100644
--- a/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs
+++ b/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs
@@ -190,7 +190,7 @@ namespace Ryujinx.Audio.Backends.OpenAL
protected virtual void Dispose(bool disposing)
{
- if (disposing)
+ if (disposing && _driver.Unregister(this))
{
lock (_lock)
{
@@ -198,8 +198,6 @@ namespace Ryujinx.Audio.Backends.OpenAL
Stop();
AL.DeleteSource(_sourceId);
-
- _driver.Unregister(this);
}
}
}