[Speex-dev] different output for opt/non-opt on win32 platform

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue Jan 4 23:18:49 PST 2005

> Hmmm... i was unaware of this... so how many frames/packets of preroll are 
> required to ensure "perfect" (where perfect = as it would have been 
> reproduced at this point had the file played from the beginning) output ?
> ie basically what i'm asking is what impact does this have on seeking  or 
> editing/cutting/recombining ? Because when you just seek to some random 
> point... obviously it doesn't have the same memory state as if it had played 
> to there. I assume the difference is either very small or over such a short 
> duration that the audio change at a seek essentially masks it ?

In theory, you can never get perfect decoded output if you seek.
However, in most cases I doubt you can tell something's wrong when you
just seek normally. Just to be on the safe side, I'd recommend decoding
something like 3 frames before the first frame you want to play after a
seek. Also, it's very important to reset the decoder state before
decoding those 3 "context" frames. You can do that with
speex_decoder_ctl(state, SPEEX_RESET_STATE, NULL);


Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke

More information about the Speex-dev mailing list