1
0
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:
Michał Janiszewski
2023-04-07 12:15:11 +02:00
parent ce4ca96b27
commit 8d30e9dfaa

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;