mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
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:
@@ -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