[Vorbis] ov_read, callbacks and 0 bytes read

Ralph Giles giles at xiph.org
Fri Oct 6 08:42:33 PDT 2006


On Fri, Oct 06, 2006 at 03:39:49AM -0700, Andrew Lentvorski wrote:

> Is there some example code somewhere else that doesn't mix the fetching 
> and processing quite so intimately?  There's a lot of stuff interacting 
> inside _fetch_and_process_packet that is going to be hard to tease apart.

Mike is suggesting you not use vorbisfile at all. Take a look at 
examples/decoder_example.c in the libvorbis source distribution. This 
shows how to use the lower level api.

You can just 'ogg_sync_wrote()' whatever bytes you were able to read and 
let it take care of buffering the data, and then go as far as you can 
down the call sequence before returning and waiting for more data.

 -r


More information about the Vorbis mailing list