diff options
author | Mary <me@thog.eu> | 2021-02-28 17:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 17:20:34 +0100 |
commit | d02eeed9c1ba8a8e4d18f18c24588f2953ad7ed6 (patch) | |
tree | 2b9b9a56d33210d4e04b6a94b949ef2f1c4af522 /Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs | |
parent | 460a98390eba42262aed3ffcaae72dda7eea5eb5 (diff) |
Haydn: Make SoundIO session implementation lock-free (#2068)
* Haydn: Fix race condition in SoundIO Update implementation
This should fix weird crashes happening for some people with SoundIO.
Fix #2062
* haydn: Make SoundIO session lock-free
Diffstat (limited to 'Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs')
-rw-r--r-- | Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs b/Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs index b43143d6..7f32b953 100644 --- a/Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs +++ b/Ryujinx.Audio.Backends.SoundIo/SoundIoAudioBuffer.cs @@ -2,8 +2,15 @@ { class SoundIoAudioBuffer { - public ulong DriverIdentifier; - public ulong SampleCount; + public readonly ulong DriverIdentifier; + public readonly ulong SampleCount; public ulong SamplePlayed; + + public SoundIoAudioBuffer(ulong driverIdentifier, ulong sampleCount) + { + DriverIdentifier = driverIdentifier; + SampleCount = sampleCount; + SamplePlayed = 0; + } } } |