diff options
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 99fb5f06..9ab0e43a 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -532,6 +532,7 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) ALCcontext *pContext; ALsource *pSource; ALbufferlistitem *pALBufferListItem; + ALuint i; pContext = alcGetCurrentContext(); if (pContext) @@ -573,7 +574,19 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) case AL_LOOPING: if ((lValue == AL_FALSE) || (lValue == AL_TRUE)) + { pSource->bLooping = (ALboolean)lValue; + + pALBufferListItem = pSource->queue; + for(i = 0;pALBufferListItem != NULL;i++) + { + if(lValue == AL_FALSE && i <= pSource->BuffersPlayed) + pALBufferListItem->bufferstate = PROCESSED; + else + pALBufferListItem->bufferstate = PENDING; + pALBufferListItem = pALBufferListItem->next; + } + } else alSetError(AL_INVALID_VALUE); break; |