[Vorbis-dev] Total uncompressed size

Tony O'Bryan TO'Bryan at greenecountymo.org
Thu Sep 1 10:10:24 PDT 2005


On Thursday 01 September 2005 11:17 am, Christopher Egner wrote:

> ...if you're trying to compute how much space you need to store a wave
> or something similar, you almost always need a header.
>
> Christopher

That was my intent.  The sound system for my game engine is using Vorbis for 
the music, loaded from a zip file ala Q3A, and I need to determine how much 
memory to allocate for the uncompressed file.

I'm going to try using the header+granulepos approach.  It just means I'll 
have to make two passes through the file: one quick read through the pages to 
calculate the total size, then a second pass to decode it into memory.

Thanks for the replies.



More information about the Vorbis-dev mailing list