[Openal]How to calculate the true 'current-playing-time' for a streaming source?

Keshav B Channa kbc at dhruva.com
Mon Mar 3 02:45:02 PST 2008


Hi,

Which is the best method to calculate the 'current-playing-time' for a streaming source, in real-time?

Right now, I'm doing this: (this is not real time determination)
After every buffer is finished processing, I calculate the 'duration' of that buffer, and add it to a variable.
There is a lag of the current buffer that is already being processed.

Is there a function to determine the "total bytes processed" for a source, so that I can determine the current-time accurately and precisely?
Or if you know of any other method, then please let me know.

I need high accuracy for determining the current playing position.



Also, the time returned by AL_SEC_OFFSET seems to be different from the timer that I'm using.
Has anybody else had this problem?


Thanks





More information about the Openal mailing list