[Speex-dev] Question about granulepos in packets

Owen speex-dev at aerodrome.us
Thu Sep 16 23:19:54 PDT 2004


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


More information about the Speex-dev mailing list