[Speex-dev] 2 questions, frame size and SPEEX_GET_LOOKAHEAD

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Tue Oct 31 03:35:20 PST 2006

Jia Pu a écrit :
> 1. What to do with the last frame that is smaller then frame size?
> During encoding, the last frame is often smaller than the required frame
> size. In the sample code, proper number of zeros are padded at the end.
> So if I don't want those padded zero after decoding, I assume that it is
> up to me to keep track of the number of zeros. Is it right?


> 2. What does SPEEX_GET_LOOKAHEAD do? How to use it?
> In speexenc.c, there is following code:
> ...
> speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &lookahead);
> ...
> nb_encoded = -lookahead;
> Can someone explain what this means?

The lookahead is the number of samples you need to discard at the start.


More information about the Speex-dev mailing list