Use std::atomic enum for SFXStatus
This commit is contained in:
@@ -43,7 +43,7 @@ class SFXBase : public NoCopy
|
||||
{
|
||||
public:
|
||||
/** Status of a sound effect. */
|
||||
enum SFXStatus
|
||||
enum SFXStatus : int
|
||||
{
|
||||
SFX_UNKNOWN = -1, SFX_STOPPED = 0, SFX_PAUSED = 1, SFX_PLAYING = 2,
|
||||
SFX_NOT_INITIALISED = 3
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifdef ENABLE_SOUND
|
||||
|
||||
#include <assert.h>
|
||||
#include <atomic>
|
||||
#ifdef __APPLE__
|
||||
# define OPENAL_DEPRECATED
|
||||
# include <OpenAL/al.h>
|
||||
@@ -48,7 +49,7 @@ private:
|
||||
ALuint m_sound_source;
|
||||
|
||||
/** The status of this SFX. */
|
||||
SFXStatus m_status;
|
||||
std::atomic<SFXStatus> m_status;
|
||||
|
||||
/** If the sfx is positional. */
|
||||
bool m_positional;
|
||||
|
||||
Reference in New Issue
Block a user