From a2358ffc418c125845c91a4247c46f56a2c32237 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 9 Sep 2010 18:27:14 -0700 Subject: Source positions at and after the end of the buffer queue go back to 0 --- OpenAL32/alSource.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenAL32/alSource.c') 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) -- cgit v1.2.3