aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alSource.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 3111a48a..b9479905 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -175,7 +175,7 @@ typedef struct ALsource {
ALint SourceType;
/** Source state (initial, playing, paused, or stopped) */
- ALenum state;
+ ATOMIC(ALenum) state;
ALenum new_state;
/** Source Buffer Queue info. */
@@ -224,6 +224,13 @@ void UpdateAllSourceProps(ALCcontext *context);
ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state);
ALboolean ApplyOffset(ALsource *Source);
+inline ALboolean IsPlayingOrPaused(ALsource *source)
+{
+ ALenum state = ATOMIC_LOAD_SEQ(&source->state);
+ return state == AL_PLAYING || state == AL_PAUSED;
+}
+
+
ALvoid ReleaseALSources(ALCcontext *Context);
#ifdef __cplusplus