[Speex-dev] Speex granulepos definition

Ralph Giles giles at xiph.org
Fri Jun 17 04:38:46 PDT 2005


 What exactly does the speex code do to calculate the granulepos? With 
vorbis it's the 'count of decodable samples including this packet'. So 
if you had a packet that allowed you to decode 1024 samples since the 
beginning of playback, the granulepos is 1024, not for example 1023 
which would be the *index* of the last sample assuming C-style array 
indicies starting at 0.

 Put another way, if you had a speex stream that encoded only one sample 
in one packet in one page, what would be the granulepos of that page?

 I'm trying to figure out (with Thomas and Conrad) what all the codec 
implementations actually do so we can nail down the spec and/or best 
practices a little better.


More information about the Speex-dev mailing list