diff options
author | Chris Robinson <[email protected]> | 2010-01-12 02:26:38 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-01-12 02:26:38 -0800 |
commit | 026b4b8f4cfaf50638319e9869d14a1262134f31 (patch) | |
tree | 9981afa4a9f4f79ca8d7103170cadcc200dfbb9a /OpenAL32/alSource.c | |
parent | c924a50bed9454e6adfe8c81e47eb8b0b26d51f7 (diff) |
Better handle large second offsets
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 441f8275..4ed1ee6b 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2136,8 +2136,8 @@ static ALint GetByteOffset(ALsource *pSource) case AL_SEC_OFFSET: // Note - lOffset is internally stored as Milliseconds - lByteOffset = (ALint)(pSource->lOffset * lChannels * lBytes * flBufferFreq / 1000.0f); - lByteOffset -= (lByteOffset % (lChannels * lBytes)); + lByteOffset = (ALint)(pSource->lOffset / 1000.0f * flBufferFreq); + lByteOffset *= lChannels * lBytes; break; } |