aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
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)