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:
Michał Janiszewski committed 2023-04-07 12:15:11 +02:00
1 parent ce4ca96b27
commit 8d30e9dfaa
1 file changed
+2 -1
+2 -1
View File
@@ -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;