[Speex-dev] discontinous transmision causes discontinous sound
Mike Taht
mike.taht at gmail.com
Wed Apr 19 22:52:52 PDT 2006
On 4/19/06, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote:
>
> On Wed, 2006-04-19 at 11:33 +0200, Jesús Morión wrote:
> > Hi, im working on a voIP application. In order to reduce the traffic,
> > decided not to send "silence" blocks.
>
> > I have tried to reset the decoder, decode with NULL bits or recreate the
> > decoder, before decode the "sound" block, and no one of these solutions
> > solved the problem or minimized it.
>
> What you need is to reset the encoder as well, so that the encoder and
> decoder are in sync. But even then, you might get better results with
> the builting DTX (except that the VAD is uses is not as good as the one
> in the preprocessor).
Hmm, I think I am running into a similar problem in asterisk (see
http://bugs.digium.com/view.php?id=6993).
Basically on the transmitting side, what's happening in the ivr is:
create a new speex encoder, open and transcode (from gsm to speex) a file
while sending it, close, destroy the encoder
create a new speex encoder, open and transcode a file (from ulaw to speex)
while sending it, close, destroy the encoder
repeat ad infinitum.
on the receiving side, the same decoder stays on all the time.
The symptoms are varied. One symptom is short audio sequences get lost on
the receiving side. Another is my packet stream jitters like mad (see packet
trace in above bug). I was thinking of addressing some of the latter (theory
being that it took too long to create a new encoder) problem with
pre-allocating encoders (as calling malloc/calloc in a rt thread is a bad
idea), but it would be better to always leave one encoder and decoder
running, but definately having the encoder always tell the decoder that it's
stream has changed regardless...
so... what do you mean by "reset the encoder"? Am I not closing the stream
properly and need to send a final frame of some sort on the way out? (see
speextolin destroy and the framein/frameout.... code). I've tried it with
various combinations of dtx/vad/quality etc.
The code's at http://www.asterisk.org/doxygen/codec__speex_8c.html
Jean-Marc
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
>
--
Mike Taht
PostCards From the Bleeding Edge
http://the-edge.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060419/8fcf4ee5/attachment.html
More information about the Speex-dev
mailing list