aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-23 10:38:27 -0800
committerChris Robinson <[email protected]>2018-01-23 10:38:27 -0800
commit4f9a0460c4a0fc6df5dba8b98ee6ac4e3ed7d90a (patch)
treed1f6d2054b39f8be02bf29778da7fa94ad20aacf /OpenAL32/alSource.c
parentad61392318d3054d1c3810a6cc0ac0924dddab6f (diff)
Add a flag for persistent mapping
And a function to "flush" a mapped buffer
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 24f48895..8b3cb305 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -760,7 +760,8 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p
}
WriteLock(&Source->queue_lock);
- if(buffer && buffer->MappedAccess != 0)
+ if(buffer && buffer->MappedAccess != 0 &&
+ !(buffer->MappedAccess&AL_MAP_PERSISTENT_BIT_SOFT))
{
WriteUnlock(&Source->queue_lock);
UnlockBuffersRead(device);
@@ -2888,7 +2889,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint src, ALsizei nb, const ALu
ReadLock(&buffer->lock);
IncrementRef(&buffer->ref);
- if(buffer->MappedAccess != 0)
+ if(buffer->MappedAccess != 0 && !(buffer->MappedAccess&AL_MAP_PERSISTENT_BIT_SOFT))
{
WriteUnlock(&source->queue_lock);
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, buffer_error);