Tay YueWeng
2005-Apr-19 09:09 UTC
[Speex-dev] speex voice seems to be bit breaking over long distance.
Hi Jean,> Actually, Speex has Packet Loss Concealment (PLC) > builtin. If a packet > is missing, instead of repeating the previous one, > just try decoding by > passing NULL instead of the SpeexBits struct. >Thanks, I have made the above changes and the effect seems to be better now.> > I think jitter buffering is more correct way to > solve > > this problem but I think this is not so easy. Is > there > > got any source code to reference from? > > Look for the speex_jitter.h header.I tried to implement it but I don't really understand the parameters for the speex_jitter_get() and speex_jitter_put() function. I have the following questions: Since the second parameter of speex_jitter_put() is a char* and the second parameter of speex_jitter_get() is a short*, does it mean that these two function will actually replace speex_bits_read_from() and speex_decode_int()? Also, which timestamp should I use for the third parameter of speex_jitter_put(), should I use the GetTickCount() value at the point when I first receive a voice packet from the microphone? Finally, what is the use of the third parameter (timestamp) of speex_jitter_get()? Thanks very much. Hopes my question is not too many. Regards, YueWeng __________________________________ Do you Yahoo!? Plan great trips with Yahoo! Travel: Now over 17,000 guides! http://travel.yahoo.com/p-travelguide
Jean-Marc Valin
2005-Apr-19 11:21 UTC
[Speex-dev] speex voice seems to be bit breaking over long distance.
> I tried to implement it but I don't really understand > the parameters for the speex_jitter_get() and > speex_jitter_put() function. I have the following > questions: > > Since the second parameter of speex_jitter_put() is a > char* and the second parameter of speex_jitter_get() > is a short*, does it mean that these two function will > actually replace speex_bits_read_from() and > speex_decode_int()?Yes, it does the decoding internally.> Also, which timestamp should I use for the third > parameter of speex_jitter_put(), should I use the > GetTickCount() value at the point when I first receive > a voice packet from the microphone?The third parameter of speex_jitter_put() actually *returns* the timestamp you got. You can also pass NULL if you're not interested in the value.> Finally, what is the use of the third parameter > (timestamp) of speex_jitter_get()?This one tells the jitter buffer what timestamp the packet you're giving it corresponds to. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke