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
This commit is contained in:
Mary 2021-02-28 17:20:34 +01:00 committed by GitHub
parent 460a98390e
commit d02eeed9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 40 deletions

View file

@ -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;
}
}
}