aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-11 08:53:38 -0700
committerChris Robinson <[email protected]>2010-05-11 08:53:38 -0700
commit4e65e9bfa968b90c13fafe99b0d2fd2874a9191e (patch)
treef2959b4a5f88639cbd2a708dbb2a9f1189375ca8 /OpenAL32
parent053aeee5d3ea7c820004526c7346287cf30f3e57 (diff)
Only a streaming source can have a processed buffer
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alSource.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index d9fdec0a..b9762167 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -571,8 +571,8 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
{
// Source is now in UNDETERMINED mode
Source->lSourceType = AL_UNDETERMINED;
- Source->BuffersPlayed = 0;
}
+ Source->BuffersPlayed = 0;
// Update AL_BUFFER parameter
Source->Buffer = buffer;
@@ -1088,7 +1088,7 @@ AL_API ALvoid AL_APIENTRY alGetSourcei(ALuint source, ALenum eParam, ALint *plVa
break;
case AL_BUFFERS_PROCESSED:
- if(Source->bLooping)
+ if(Source->bLooping || Source->lSourceType != AL_STREAMING)
{
/* Buffers on a looping source are in a perpetual state
* of PENDING, so don't report any as PROCESSED */
@@ -1662,7 +1662,8 @@ AL_API ALvoid AL_APIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALui
goto done;
}
- if(Source->bLooping || (ALuint)n > Source->BuffersPlayed)
+ if(Source->bLooping || Source->lSourceType != AL_STREAMING ||
+ (ALuint)n > Source->BuffersPlayed)
{
// Some buffers can't be unqueue because they have not been processed
alSetError(Context, AL_INVALID_VALUE);