[Speex-dev] Jitter buffer

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue Dec 21 21:38:14 PST 2004


Hi Steve,

Though it may work (haven't thought about all the details), I think it
would be much more messy than just using a codec abstraction layer (the
one in Speex or a custom one). I don't understand why you don't like
that idea.

	Jean-Marc

> And later, it might also be useful to have an API which takes a bunch
> of SpeexBits, and gives the caller a way to split up the SpeexBits
> into separate 20ms frames.  [The first API could be a subset of this].
> 
> The main API would be: 
> 
> int speex_decode_bits(SpeexBits *inBits, SpeexBits*outBits).  
> 
> inBits is SpeexBits containing the bits we're interested in.
> outBits may be NULL.  If not NULL, and inBits contains valid frames,
> they are written, one frame per call, to outBits.
> 
> it would return the same values as speex_decode(_int).
> 
> 
> SpeexBits inBits, outBits;
> void *state;
> 
> initialize:
>     state = speex_decoder_init(&speex_nb_mode);
> 
> 
> process:
>     speex_bits_read_from(&inBits, inBuf, inlen);
> 
>     for(i=0; ;i+=160) {
>        if(speex_decode_bits(&inBits,&outBits)) break;
>        
>         /* do something with outBits, if you want */
>     }
> 
>     (i) now contains the number of samples contained in inBuf.
> 
> 
> I think this is the simplest, most sensible API, no?
> 
> -SteveK
> 
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list