[vorbis-dev] getting a wierd results from ov_time_tell()
Akshay Dhalwala
akdjr at softhome.net
Sun Jul 15 23:50:46 PDT 2001
>From the documentation that I read, ov_time_tell is supposed to tell you
the how many seconds the decoder is into in the stream. However, I'm
getting some weird results from it. On my stream (which is seekable - I
verified it), ov_time_total returns the correct total seconds. However,
when I start playing, ov_time_tell first gives me a wrong floating point
number (like 4.969.). when I call it a second later, I get something
like 9. as I decode the stream, the time that ov_time_tell is not the
right time - one second into the song, and it returns a number much
higher than 1. Has anyone else experienced this??
(a debug log file that my program creates)
/////////////////////////////
Directsound object created
cooperative level set
test.ogg opened
channels:
2
sampling rate:
44100
DS buffer size:
819200
Sound buffer created
number of bitstreams:
1
total time:
355
Seekable:
1
filling buffer
200
Current Time:
4.64399
Current Time:
4.64399
Current Time:
4.64399
Current Time:
4.64399
resetting write cursor
filling buffer
200
Current Time:
5.04018
Current Time:
9.28798
Current Time:
9.28798
Current Time:
9.28798
Current Time:
9.28798
resetting write cursor
filling buffer
200
Current Time:
13.932
Current Time:
13.932
Current Time:
13.932
Current Time:
13.932
Current Time:
13.932
resetting write cursor
filling buffer
200
Current Time:
18.576
Current Time:
18.576
Current Time:
18.576
Current Time:
18.576
resetting write cursor
filling buffer
200
Current Time:
21.641
Current Time:
23.22
Current Time:
23.22
Current Time:
23.22
Current Time:
23.22
resetting write cursor
filling buffer
200
Current Time:
27.8639
Current Time:
27.8639
exiting playback thread
exiting....
///////////////////////
the places where it says current time are the interesting ones. Where
it says 27.8639, that is actually about 5-10 seconds into the song.
current time is written to the debug log every one second.
akshay
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list