aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-09-09 18:27:14 -0700
committerChris Robinson <[email protected]>2010-09-09 18:27:14 -0700
commita2358ffc418c125845c91a4247c46f56a2c32237 (patch)
tree9f3513f7cb6eda908a292b6660d03002a787b321 /OpenAL32/alSource.c
parent33eb2786f872a33bd74f7e6fa46666853adcf79e (diff)
Source positions at and after the end of the buffer queue go back to 0
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index b839356d..21a4a6eb 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1859,11 +1859,11 @@ static ALvoid GetSourceOffset(ALsource *Source, ALenum name, ALdouble *offset, A
}
else
{
- // Clamp positions to TotalBufferDataSize
- if(readPos > TotalBufferDataSize)
- readPos = TotalBufferDataSize;
- if(writePos > TotalBufferDataSize)
- writePos = TotalBufferDataSize;
+ // Wrap positions back to 0
+ if(readPos >= TotalBufferDataSize)
+ readPos = 0;
+ if(writePos >= TotalBufferDataSize)
+ writePos = 0;
}
switch(name)