[Speex-dev] Question about granulepos in packets

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Thu Sep 16 23:30:52 PDT 2004


Hi Owen,

The granulepos is only available on a per-page basis (otherwise it would
take up too much space). You can probably see how to use it by looking
at speexdec.c

	Jean-Marc

On jeu, 2004-09-16 at 23:19 -0700, Owen wrote:
> I've got a question about the granulepos in speex packets.
> 
> >From the speex manual (http://www.speex.org/manual2/node7.html#SECTION00073000000000000000):
> 
> >The third and subsequent packets each contain one or more (number found in header) Speex frames. These are identified with packetno starting from 2 and the granulepos is the number of the last sample encoded in that packet.
> 
> In experimenting however, it seems that the granulepos is only valid in the last packet in each ogg page -- all other packets have it set to -1.
> 
> Are the docs incorrect, or am I doing something wrong?  If the granulepos isn't available on a per-packet basis, is there a recommended way of quickly seeking to a particular sample frame?
> 
> Thanks in advance for any pointers.
> 
> Regards,
> Owen
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev




More information about the Speex-dev mailing list