forked from rosebudai/OpenRCT2-Web
Make audio source release status atomic
As audio sources get released from a callback done in a thread separate from main, the released status needs to be atomic.
This commit is contained in:
1 parent
ce4ca96b27
commit
8d30e9dfaa
1 file changed
+2
-1
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "AudioFormat.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <SDL.h>
|
||||
#include <memory>
|
||||
#include <openrct2/audio/AudioSource.h>
|
||||
@@ -28,7 +29,7 @@ namespace OpenRCT2::Audio
|
||||
class SDLAudioSource : public IAudioSource
|
||||
{
|
||||
private:
|
||||
bool _released{};
|
||||
std::atomic<bool> _released{};
|
||||
|
||||
public:
|
||||
void Release() override;
|
||||
|
||||
Reference in new issue
Block a user