[Vorbis-dev] Comments in vorbisfile_example
Monty
xiphmont at xiph.org
Thu Jun 16 13:50:22 PDT 2005
On Thu, Jun 16, 2005 at 10:55:02AM -0500, Christopher Egner wrote:
> I have a couple of questions with respect to "vorbisfile_example.c" in the
> ov sdk.
>
>
>
> 1) Near the end, there is a comment that says "we don't bother dealing
> with sample rate changes, etc, but you'll have to." I assume the author is
> regarding to different sample rates as a whole, not dynamic sample rates. Am
> I correct in that assumption?
No; Chained vorbis files can change sample rates dynamically from link to link.
> 2) That etc bothers me. Are there other things I should keep an eye
> out for? I can't seem to think of any.
No, that's the only big one.
> 3) At the top, he says that using vorbisfile is easier than using
> libvorbis. Is there any advantage to using libvorbis? I honestly can't see
> one, unless one needs access to raw functions for some reason.
Not really; certainly not unless there's something very specific you
need to do that vorbisfile can't do.
> With respect to the "encoder_example" why do you use a random number for the
> stream rather than just starting at some arbitrary number (zero or
> otherwise) and increment. The only viable reason I can assume is to prevent
> logical streams becoming mixed because of bad transfer. Is there some other
> reason?
If you construct a file of two links witht he same serialnumber (eg,
using cat), the file won't work. The random serialno just makes it
highly likley that the act of chaining two vorbis files into one will
be a trivial operation (as opposed to re-paging one of the files).
Monty
More information about the Vorbis-dev
mailing list