Better handle large second offsets

This commit is contained in:
Chris Robinson 2010-01-12 02:26:38 -08:00
parent c924a50bed
commit 026b4b8f4c

View File

@ -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;
}