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/SoundIoHardwareDeviceSession.cs | |
| parent | df5be5812f9ebfd6533ef3eefdcdb24d30f29954 (diff) | |
[Ryujinx.Audio.Backends.SoundIo] Address dotnet-format issues (#5360)
* 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/SoundIoHardwareDeviceSession.cs')
| -rw-r--r-- | src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceSession.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceSession.cs b/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceSession.cs index 96d9ce97..0aa13e7e 100644 --- a/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceSession.cs +++ b/src/Ryujinx.Audio.Backends.SoundIo/SoundIoHardwareDeviceSession.cs @@ -12,12 +12,12 @@ namespace Ryujinx.Audio.Backends.SoundIo { class SoundIoHardwareDeviceSession : HardwareDeviceSessionOutputBase { - private SoundIoHardwareDeviceDriver _driver; - private ConcurrentQueue<SoundIoAudioBuffer> _queuedBuffers; + private readonly SoundIoHardwareDeviceDriver _driver; + private readonly ConcurrentQueue<SoundIoAudioBuffer> _queuedBuffers; private SoundIoOutStreamContext _outputStream; - private DynamicRingBuffer _ringBuffer; + private readonly DynamicRingBuffer _ringBuffer; private ulong _playedSampleCount; - private ManualResetEvent _updateRequiredEvent; + private readonly ManualResetEvent _updateRequiredEvent; private int _disposeState; public SoundIoHardwareDeviceSession(SoundIoHardwareDeviceDriver driver, IVirtualMemoryManager memoryManager, SampleFormat requestedSampleFormat, uint requestedSampleRate, uint requestedChannelCount, float requestedVolume) : base(memoryManager, requestedSampleFormat, requestedSampleRate, requestedChannelCount) @@ -54,7 +54,7 @@ namespace Ryujinx.Audio.Backends.SoundIo public override void QueueBuffer(AudioBuffer buffer) { - SoundIoAudioBuffer driverBuffer = new SoundIoAudioBuffer(buffer.DataPointer, GetSampleCount(buffer)); + SoundIoAudioBuffer driverBuffer = new(buffer.DataPointer, GetSampleCount(buffer)); _ringBuffer.Write(buffer.Data, 0, buffer.Data.Length); @@ -81,7 +81,7 @@ namespace Ryujinx.Audio.Backends.SoundIo _driver.FlushContextEvents(); } - public override void UnregisterBuffer(AudioBuffer buffer) {} + public override void UnregisterBuffer(AudioBuffer buffer) { } public override bool WasBufferFullyConsumed(AudioBuffer buffer) { |
