From 7f9dccb29388ad4b50c97e3f58feeb7df87c3386 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Mon, 30 Dec 2024 00:09:31 -0600 Subject: [PATCH] misc: chore: Cleanup DummyHardwareDeviceDriver.cs --- .../Backends/Dummy/DummyHardwareDeviceDriver.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Ryujinx.Audio/Backends/Dummy/DummyHardwareDeviceDriver.cs b/src/Ryujinx.Audio/Backends/Dummy/DummyHardwareDeviceDriver.cs index 3a3c1d1b1..5991b816f 100644 --- a/src/Ryujinx.Audio/Backends/Dummy/DummyHardwareDeviceDriver.cs +++ b/src/Ryujinx.Audio/Backends/Dummy/DummyHardwareDeviceDriver.cs @@ -9,20 +9,12 @@ namespace Ryujinx.Audio.Backends.Dummy { public class DummyHardwareDeviceDriver : IHardwareDeviceDriver { - private readonly ManualResetEvent _updateRequiredEvent; - private readonly ManualResetEvent _pauseEvent; + private readonly ManualResetEvent _updateRequiredEvent = new(false); + private readonly ManualResetEvent _pauseEvent = new(true); public static bool IsSupported => true; - public float Volume { get; set; } - - public DummyHardwareDeviceDriver() - { - _updateRequiredEvent = new ManualResetEvent(false); - _pauseEvent = new ManualResetEvent(true); - - Volume = 1f; - } + public float Volume { get; set; } = 1f; public IHardwareDeviceSession OpenDeviceSession(Direction direction, IVirtualMemoryManager memoryManager, SampleFormat sampleFormat, uint sampleRate, uint channelCount) { @@ -60,7 +52,7 @@ namespace Ryujinx.Audio.Backends.Dummy Dispose(true); } - protected virtual void Dispose(bool disposing) + private void Dispose(bool disposing) { if (disposing) {