diff options
author | Chris Robinson <[email protected]> | 2010-09-09 18:27:14 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-09-09 18:27:14 -0700 |
commit | a2358ffc418c125845c91a4247c46f56a2c32237 (patch) | |
tree | 9f3513f7cb6eda908a292b6660d03002a787b321 /OpenAL32 | |
parent | 33eb2786f872a33bd74f7e6fa46666853adcf79e (diff) |
Source positions at and after the end of the buffer queue go back to 0
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alSource.c | 10 |
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) |