[vorbis] decompressed size ?

Monty xiphmont at xiph.org
Thu Feb 1 17:38:03 PST 2001



On Thu, Feb 01, 2001 at 05:09:59PM -0800, charlie wallace wrote:
> whats the best way to determine the size of the decompressed data ?
> so if i wanted to preallocate a buffer that would contain the whole
> decompressed sound how would i determine this ?

Some variant of:

FILE *f=fopen("filename","r");
errorp=ov_open("filename",&handle,NULL,0);
if(errorp)exit(1);
total_samples=ov_pcm_total(&handle,-1);

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list