aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-02 14:36:53 -0800
committerChris Robinson <[email protected]>2018-12-02 14:36:53 -0800
commit60254488e9faa2934e9d261328a3c0359056bdd0 (patch)
tree14ec8085619bc9e721f251c90d45835111db6c7f
parent4e17ad3ec03f171509ed58a5cbb997b3955bc5ce (diff)
Add a couple missing source lock guards
-rw-r--r--OpenAL32/alSource.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp
index 11cea945..4cc3526b 100644
--- a/OpenAL32/alSource.cpp
+++ b/OpenAL32/alSource.cpp
@@ -2855,6 +2855,7 @@ AL_API ALvoid AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources)
SETERR_RETURN(context.get(), AL_INVALID_VALUE,, "Pausing %d sources", n);
if(n == 0) return;
+ std::lock_guard<std::mutex> _{context->SourceLock};
for(ALsizei i{0};i < n;i++)
{
if(!LookupSource(context.get(), sources[i]))
@@ -2890,6 +2891,7 @@ AL_API ALvoid AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources)
SETERR_RETURN(context.get(), AL_INVALID_VALUE,, "Stopping %d sources", n);
if(n == 0) return;
+ std::lock_guard<std::mutex> _{context->SourceLock};
for(ALsizei i{0};i < n;i++)
{
if(!LookupSource(context.get(), sources[i]))
@@ -2933,6 +2935,7 @@ AL_API ALvoid AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources)
SETERR_RETURN(context.get(), AL_INVALID_VALUE,, "Rewinding %d sources", n);
if(n == 0) return;
+ std::lock_guard<std::mutex> _{context->SourceLock};
for(ALsizei i{0};i < n;i++)
{
if(!LookupSource(context.get(), sources[i]))