Fix streaming sound time

This commit is contained in:
Chris Robinson 2015-11-24 04:54:14 -08:00
parent 3ce6aee98b
commit 5ad772c3b3

View file

@ -376,7 +376,7 @@ double OpenAL_SoundStream::getTimeOffset()
{
ALint queued;
alGetSourcei(mSource, AL_BUFFERS_QUEUED, &queued);
ALint inqueue = mBufferSize/mFrameSize*queued + offset;
ALint inqueue = mBufferSize/mFrameSize*queued - offset;
t = (double)(mDecoder->getSampleOffset() - inqueue) / (double)mSampleRate;
}
else