aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c4
-rw-r--r--OpenAL32/alSource.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index f5e615e8..2faa84d2 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1608,9 +1608,9 @@ void ALCcontext_ProcessUpdates(ALCcontext *context)
if((Source->state == AL_PLAYING || Source->state == AL_PAUSED) &&
Source->Offset >= 0.0)
{
- ReadLock(&Source->queue_lock);
+ WriteLock(&Source->queue_lock);
ApplyOffset(Source);
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
}
new_state = Source->new_state;
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index b8677539..0d454882 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -494,14 +494,14 @@ static ALboolean SetSourcefv(ALsource *Source, ALCcontext *Context, SourceProp p
if((Source->state == AL_PLAYING || Source->state == AL_PAUSED) &&
!Context->DeferUpdates)
{
- ReadLock(&Source->queue_lock);
+ WriteLock(&Source->queue_lock);
if(ApplyOffset(Source) == AL_FALSE)
{
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
UnlockContext(Context);
SET_ERROR_AND_RETURN_VALUE(Context, AL_INVALID_VALUE, AL_FALSE);
}
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
}
UnlockContext(Context);
return AL_TRUE;
@@ -676,14 +676,14 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p
if((Source->state == AL_PLAYING || Source->state == AL_PAUSED) &&
!Context->DeferUpdates)
{
- ReadLock(&Source->queue_lock);
+ WriteLock(&Source->queue_lock);
if(ApplyOffset(Source) == AL_FALSE)
{
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
UnlockContext(Context);
SET_ERROR_AND_RETURN_VALUE(Context, AL_INVALID_VALUE, AL_FALSE);
}
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
}
UnlockContext(Context);
return AL_TRUE;
@@ -2569,7 +2569,7 @@ static ALvoid InitSourceParams(ALsource *Source)
*/
ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
{
- ReadLock(&Source->queue_lock);
+ WriteLock(&Source->queue_lock);
if(state == AL_PLAYING)
{
ALCdevice *device = Context->Device;
@@ -2695,7 +2695,7 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
}
Source->Offset = -1.0;
}
- ReadUnlock(&Source->queue_lock);
+ WriteUnlock(&Source->queue_lock);
}
/* GetSourceSampleOffset