aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Audio')
-rw-r--r--src/Ryujinx.Audio/AudioManager.cs2
-rw-r--r--src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs2
-rw-r--r--src/Ryujinx.Audio/Input/AudioInputManager.cs4
-rw-r--r--src/Ryujinx.Audio/Input/AudioInputSystem.cs2
-rw-r--r--src/Ryujinx.Audio/Output/AudioOutputManager.cs4
-rw-r--r--src/Ryujinx.Audio/Output/AudioOutputSystem.cs2
-rw-r--r--src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs2
-rw-r--r--src/Ryujinx.Audio/Renderer/Server/AudioRendererManager.cs4
-rw-r--r--src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs2
9 files changed, 12 insertions, 12 deletions
diff --git a/src/Ryujinx.Audio/AudioManager.cs b/src/Ryujinx.Audio/AudioManager.cs
index c37ca4a3..9f2a05b0 100644
--- a/src/Ryujinx.Audio/AudioManager.cs
+++ b/src/Ryujinx.Audio/AudioManager.cs
@@ -11,7 +11,7 @@ namespace Ryujinx.Audio
/// <summary>
/// Lock used to control the waiters registration.
/// </summary>
- private object _lock = new object();
+ private readonly object _lock = new();
/// <summary>
/// Events signaled when the driver played audio buffers.
diff --git a/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs b/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs
index 9bf20d4b..d17303cd 100644
--- a/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs
+++ b/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs
@@ -10,7 +10,7 @@ namespace Ryujinx.Audio.Backends.Common
{
private const int RingBufferAlignment = 2048;
- private object _lock = new object();
+ private readonly object _lock = new();
private byte[] _buffer;
private int _size;
diff --git a/src/Ryujinx.Audio/Input/AudioInputManager.cs b/src/Ryujinx.Audio/Input/AudioInputManager.cs
index ac012c4a..63cbe031 100644
--- a/src/Ryujinx.Audio/Input/AudioInputManager.cs
+++ b/src/Ryujinx.Audio/Input/AudioInputManager.cs
@@ -14,12 +14,12 @@ namespace Ryujinx.Audio.Input
/// </summary>
public class AudioInputManager : IDisposable
{
- private object _lock = new object();
+ private readonly object _lock = new();
/// <summary>
/// Lock used for session allocation.
/// </summary>
- private object _sessionLock = new object();
+ private readonly object _sessionLock = new();
/// <summary>
/// The session ids allocation table.
diff --git a/src/Ryujinx.Audio/Input/AudioInputSystem.cs b/src/Ryujinx.Audio/Input/AudioInputSystem.cs
index b3ca0fd6..33364e28 100644
--- a/src/Ryujinx.Audio/Input/AudioInputSystem.cs
+++ b/src/Ryujinx.Audio/Input/AudioInputSystem.cs
@@ -48,7 +48,7 @@ namespace Ryujinx.Audio.Input
/// <summary>
/// The lock of the parent.
/// </summary>
- private object _parentLock;
+ private readonly object _parentLock;
/// <summary>
/// The dispose state.
diff --git a/src/Ryujinx.Audio/Output/AudioOutputManager.cs b/src/Ryujinx.Audio/Output/AudioOutputManager.cs
index 8c21f76a..bc2fc6f4 100644
--- a/src/Ryujinx.Audio/Output/AudioOutputManager.cs
+++ b/src/Ryujinx.Audio/Output/AudioOutputManager.cs
@@ -14,12 +14,12 @@ namespace Ryujinx.Audio.Output
/// </summary>
public class AudioOutputManager : IDisposable
{
- private object _lock = new object();
+ private readonly object _lock = new();
/// <summary>
/// Lock used for session allocation.
/// </summary>
- private object _sessionLock = new object();
+ private readonly object _sessionLock = new();
/// <summary>
/// The session ids allocation table.
diff --git a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs
index 93df87aa..8378f33f 100644
--- a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs
+++ b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs
@@ -48,7 +48,7 @@ namespace Ryujinx.Audio.Output
/// <summary>
/// THe lock of the parent.
/// </summary>
- private object _parentLock;
+ private readonly object _parentLock;
/// <summary>
/// The dispose state.
diff --git a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
index 1ad7b859..8485fb4c 100644
--- a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
@@ -26,7 +26,7 @@ namespace Ryujinx.Audio.Renderer.Server
{
public class AudioRenderSystem : IDisposable
{
- private object _lock = new object();
+ private readonly object _lock = new();
private AudioRendererRenderingDevice _renderingDevice;
private AudioRendererExecutionMode _executionMode;
diff --git a/src/Ryujinx.Audio/Renderer/Server/AudioRendererManager.cs b/src/Ryujinx.Audio/Renderer/Server/AudioRendererManager.cs
index 4de0ad16..e41d5cc5 100644
--- a/src/Ryujinx.Audio/Renderer/Server/AudioRendererManager.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/AudioRendererManager.cs
@@ -19,12 +19,12 @@ namespace Ryujinx.Audio.Renderer.Server
/// <summary>
/// Lock used for session allocation.
/// </summary>
- private object _sessionLock = new object();
+ private readonly object _sessionLock = new();
/// <summary>
/// Lock used to control the <see cref="AudioProcessor"/> running state.
/// </summary>
- private object _audioProcessorLock = new object();
+ private readonly object _audioProcessorLock = new();
/// <summary>
/// The session ids allocation table.
diff --git a/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs b/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs
index b37988fe..0fee0000 100644
--- a/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs
@@ -16,7 +16,7 @@ namespace Ryujinx.Audio.Renderer.Server.Upsampler
/// <summary>
/// Global lock of the object.
/// </summary>
- private object Lock = new object();
+ private readonly object Lock = new();
/// <summary>
/// The upsamplers instances.