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

fungus spam at egg.chips.and.spam.com
Thu Mar 29 02:56:35 PST 2001



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.

Can anybody think of a solution for this? I really need a
faster response time for my in-game sounds. I realize the
difficulties of doing the seek, I was looking for a lateral
thinking sort of a solution. Can I open/seek the files
beforehand and somehow store the internal state ready for
a fast startup? There's a lot of files and various seek
points within each one so I'm not keen on having an open
OggVorbis_File for each file/seek point, that seems a
little inelegant to me. I imagine I'd also need to start
creating other threads to ov_seek() them back to the right
place after each use, ready for the next time around. Gak!

Anybody have any ideas...can I somehow grab the internal
state of a decoder into a buffer then restore it?


-- 
<\___/>
/ O O \
\_____/  FTB.

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