diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-06-25 02:15:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-25 02:15:56 +0200 |
commit | ede5b3c3240f0d4cf06f38174bf50b9f2f3593e8 (patch) | |
tree | 3b7928d1d736a6aba694ed2805ef21b9a941f32e /src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs | |
parent | df5be5812f9ebfd6533ef3eefdcdb24d30f29954 (diff) |
[Ryujinx.Audio.Backends.SoundIo] Address dotnet-format issues (#5360)1.1.909
* dotnet format style --severity info
Some changes were manually reverted.
* Address dotnet format CA1816 warnings
* Address dotnet format CA1401 warnings
* Address most dotnet format whitespace warnings
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Address review feedback
Diffstat (limited to 'src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs')
-rw-r--r-- | src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs b/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs index 02da2776..9dac0992 100644 --- a/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs +++ b/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceDriver.cs @@ -141,7 +141,7 @@ namespace Ryujinx.Audio.Backends.SoundIo throw new NotImplementedException("Input direction is currently not implemented on SoundIO backend!"); } - SoundIoHardwareDeviceSession session = new SoundIoHardwareDeviceSession(this, memoryManager, sampleFormat, sampleRate, channelCount, volume); + SoundIoHardwareDeviceSession session = new(this, memoryManager, sampleFormat, sampleRate, channelCount, volume); _sessions.TryAdd(session, 0); @@ -162,7 +162,7 @@ namespace Ryujinx.Audio.Backends.SoundIo SampleFormat.PcmInt24 => SoundIoFormat.S24LE, SampleFormat.PcmInt32 => SoundIoFormat.S32LE, SampleFormat.PcmFloat => SoundIoFormat.Float32LE, - _ => throw new ArgumentException ($"Unsupported sample format {format}"), + _ => throw new ArgumentException($"Unsupported sample format {format}"), }; } @@ -202,6 +202,8 @@ namespace Ryujinx.Audio.Backends.SoundIo public void Dispose() { + GC.SuppressFinalize(this); + if (Interlocked.CompareExchange(ref _disposeState, 1, 0) == 0) { Dispose(true); |