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

jaromil jaromil at dyne.org
Thu Mar 29 03:44:21 PST 2001



On Thu, Mar 29, 2001 at 12:29:31PM +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.
> > 
> > i'm using ov_pcm_seek_page() wich is giving me good performance on linux.
> 
> What's the difference between ov_pcm_seek() and ov_pcm_seek_page()?

i only referred to the vorbisfile.c source for exact reference

as it says about ov_pcm_seek_page:

/* Page granularity seek (faster than sample granularity because we
   don't do the last bit of decode to find a specific sample).

   Seek to the last [granule marked] page preceeding the specified pos
   location, such that decoding past the returned point will quickly
   arrive at the requested position. */

i found that source file pretty well commented and clearly understandable


-- 
jrml ..//korova.dyne.org
6EEE 4FB2 2555 7ACD 8496  AB99 E2A2 93B4 6C62 4800

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