[Vorbis-dev] ogg_stream_flush

Ralph Giles giles at xiph.org
Tue Feb 21 10:01:10 PST 2006


On Tue, Feb 21, 2006 at 10:20:12AM +0100, Joost Pennings wrote:

> So what are the advantages of ogg_stream_pageout?

More succinctly, ogg_stream_pageout will pack multiple ogg packets 
into each ogg page, and only flush after reaching a threshold size.

This works well for most data, but digital silence produces much,
much smaller packets than usual, and so it's easy to underflow the 
playback buffer if a manual flush isn't inserted. libogg doesn't
do this automatically because the mapping between the granulepos
field in the ogg_packet structure and real playback time belongs 
to a higher abstraction layer (i.e. your paging code).

HTH,
 -r


More information about the Vorbis-dev mailing list