[vorbis-dev] getting a wierd results from ov_time_tell()
Akshay Dhalwala
akdjr at softhome.net
Mon Jul 16 13:42:34 PDT 2001
Ahhhh yes. That makes sense. Also explains the numbers I am getting.
Thanks for clearing this up for me!
akshay
-----Original Message-----
From: owner-vorbis-dev at xiph.org [mailto:owner-vorbis-dev at xiph.org] On
Behalf Of Monty
Sent: Monday, July 16, 2001 9:05 AM
To: vorbis-dev at xiph.org
Subject: Re: [vorbis-dev] getting a wierd results from ov_time_tell()
On Sun, Jul 15, 2001 at 11:50:46PM -0700, Akshay Dhalwala wrote:
> >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.
Yes, it gives the time offset in seconds of the next sample to be read
from the internal buffer by ov_read();
> 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??
I have a test script here that holds the entire sample, decoded, in
memory and does 10,000 time seeks, time reads and then a decode to see
that the decoded data matches what's in the big memory buffer exactly
at the proper sample position.
Are you perhaps prefetching data from ov_read to fill a buffer of your
own (eg, the DirectShow buffer)?:
> Seekable:
> 1
> filling buffer
> 200
> Current Time:
> 4.64399
If you've already read 4.6 seconds of data from ov_read and put it in
the DS buffer, naturally ov_time_tell will not return 0 just because
the DS buffer hasn't begun playing yet.
Monty
--- >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.
--- >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