diff options
Diffstat (limited to 'src/Ryujinx.Audio/Common/AudioDeviceSession.cs')
-rw-r--r-- | src/Ryujinx.Audio/Common/AudioDeviceSession.cs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/Ryujinx.Audio/Common/AudioDeviceSession.cs b/src/Ryujinx.Audio/Common/AudioDeviceSession.cs index 0191f7cc..a0e04c80 100644 --- a/src/Ryujinx.Audio/Common/AudioDeviceSession.cs +++ b/src/Ryujinx.Audio/Common/AudioDeviceSession.cs @@ -23,7 +23,7 @@ namespace Ryujinx.Audio.Common /// <summary> /// Array of all buffers currently used or released. /// </summary> - private AudioBuffer[] _buffers; + private readonly AudioBuffer[] _buffers; /// <summary> /// The server index inside <see cref="_buffers"/> (appended but not queued to device driver). @@ -58,17 +58,17 @@ namespace Ryujinx.Audio.Common /// <summary> /// The released buffer event. /// </summary> - private IWritableEvent _bufferEvent; + private readonly IWritableEvent _bufferEvent; /// <summary> /// The session on the device driver. /// </summary> - private IHardwareDeviceSession _hardwareDeviceSession; + private readonly IHardwareDeviceSession _hardwareDeviceSession; /// <summary> /// Max number of buffers that can be registered to the device driver at a time. /// </summary> - private uint _bufferRegisteredLimit; + private readonly uint _bufferRegisteredLimit; /// <summary> /// Create a new <see cref="AudioDeviceSession"/>. @@ -311,9 +311,9 @@ namespace Ryujinx.Audio.Common return false; } - public bool AppendUacBuffer(AudioBuffer buffer, uint handle) + public static bool AppendUacBuffer(AudioBuffer buffer, uint handle) { - // NOTE: On hardware, there is another RegisterBuffer method taking an handle. + // NOTE: On hardware, there is another RegisterBuffer method taking a handle. // This variant of the call always return false (stubbed?) as a result this logic will never succeed. return false; @@ -425,10 +425,8 @@ namespace Ryujinx.Audio.Common { return 0; } - else - { - return _hardwareDeviceSession.GetPlayedSampleCount(); - } + + return _hardwareDeviceSession.GetPlayedSampleCount(); } /// <summary> @@ -515,4 +513,4 @@ namespace Ryujinx.Audio.Common } } } -}
\ No newline at end of file +} |