[Vorbis-dev] Help recording from PCM stream and silence.

Jim Buschman jim.buschman at gmail.com
Thu Dec 13 19:59:09 PST 2007


When is ogg_stream_pageout ever a even number? It's always either 0 or 1.

On Dec 13, 2007 4:33 PM, Ralph Giles <giles at xiph.org> wrote:

> On Thu, Dec 13, 2007 at 04:17:32PM -1000, Jim Buschman wrote:
>
> > no, i don't seem to ever get an eos page
>
> Ok, so assuming you set eos properly when you submit the last buffer for
> compression, you're not writing out the last bit of the stream.
>
> You need to loop on ogg_stream_pageout while it returns a positive
> number and eos is not set, inside the while loop for getting new vorbis
> packets. Then, if you're out of data and still haven't seen eos you need
> to while on ogg_stream_flush() to get the last bits out. Or you could
> not  bother checking; ogg_stream_flush() will just return 0 if there's
> no data left.
>
> HTH,
>  -r
>



-- 
~Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20071213/c0157b28/attachment.html


More information about the Vorbis-dev mailing list