[speex-dev] Computing pcm size

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed Sep 24 07:53:14 PDT 2003

There is no other way than to count the packets. Right now, there is no
Speex counterpart to libvorbisfile, but Monty is working on liboggfile
which will do the job for all the Xiph codecs, including Speex.


Le mer 24/09/2003 à 04:09, Giovanni Bajo a écrit :
> Hello,
> given a Speex-encoded ogg file, is there a way I can compute the total
> pcm size (that is, the number of samples after decompression)? I know
> I can get the frame size from the decoder with SPEEX_GET_FRAME_SIZE,
> and that the number of frames per packet is written inside the header.
> But this brings me to the question: how many packets are there in the
> file? I guess this is more related to libogg than speex itself, but
> still I thought maybe somebody could have helped me out here. In fact,
> libvorbisfile has a function to compute the total pcm size for an Ogg
> Vorbis file, but it relies on vorbis headers, not libogg.
> Thanks
> Giovanni Bajo

Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20030924/c7144ef5/signature-0001.pgp

More information about the Speex-dev mailing list