[vorbis] ov_pcm_seek() is very slow...

Monty xiphmont at xiph.org
Thu Mar 29 13:33:46 PST 2001



On Thu, Mar 29, 2001 at 11:56:35AM +0100, fungus wrote:
> 
> I realise the it's hard to do a seek in a variable bitrate
> file but I didn't think it was this bad. It seems to vary
> a lot with the file but the total time to do an ov_open()
> and ov_pcm_seek() can add upp to a second or more. By this
> time my DirectX buffers have wrapped around and are looping.

Andrew from Sonique has submitted a seek patch that speeds things up
considerably (for pcm_seek and pcm_seek_page) and I'll be applying it
to CVS soon.

It's also the case that you can just seek to a raw point in the file
(raw_seek) and just start decoding.  The bitrate doesn't vary that
much, and vorbisfile will pick up the correct time offset from the
file.

(much of the delay is because vorbisfile prebuffers enough decode
after a seek, up to the next PCM position marker, to be sure of the
exact sample offset.  Vorbisfile is meant to be a simple, easy to
understand lib, not a 100% solution to every possible application).

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-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 mailing list