<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gregory Maxwell schrieb:
<blockquote
cite="mid:e692861c0908201242u16ff0281i4826e408c2bb9794@mail.gmail.com"
type="cite">
<pre wrap="">On Thu, Aug 20, 2009 at 3:32 PM, Volker<a class="moz-txt-link-rfc2396E" href="mailto:v.fischer@nt.tu-darmstadt.de"><v.fischer@nt.tu-darmstadt.de></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">When I use CELT in the llcon software, I noticed that in the case of a
network trouble, I get a constant tone back from the CELT decoder (audio
is not muted after some audio frames as I would expect). What I do in
case of network trouble is that I use a NULL pointer instead of putting
actual coded data to the decoder to force the "error resilience" in the
decoder.
</pre>
</blockquote>
<pre wrap=""><!---->
Hm? If you call celt_decode with a null pointer in place of the data
it should fade out the audio after consecutive losses.
The relevant code is around line 1286 in celt.c:
for (i=0;i<C*N;i++)
freq[i] = ADD32(EPSILON, MULT16_32_Q15(QCONST16(.9f,15),freq[i]));
Are you, by chance, also calling it with a null pointer in place of
the output buffer?
I'll give llcon a try and see if I can reproduce </pre>
</blockquote>
This is the code I use in the llcon client for calling the CELT decoder:<br>
<br>
// CELT decoding<br>
if ( bReceiveDataOk )<br>
{<br>
celt_decode ( CeltDecoder,<br>
&vecbyNetwData[0],<br>
iCeltNumCodedBytes,<br>
&vecsAudioSndCrdMono[i *
SYSTEM_FRAME_SIZE_SAMPLES] );<br>
}<br>
else<br>
{<br>
// lost packet<br>
celt_decode ( CeltDecoder,<br>
NULL,<br>
iCeltNumCodedBytes,<br>
&vecsAudioSndCrdMono[i *
SYSTEM_FRAME_SIZE_SAMPLES] );<br>
}<br>
<br>
It's in the file client.cpp where bReceiveDataOk is false for lost
network packets, iCeltNumCodedBytes is usually 24 at a frame size of
128 samples and vecsAudioSndCrdMono is a vector class for the audio
output.<br>
<br>
You can try it out by starting your own server, then start the client,
connect and shut down the server. Just type:<br>
<br>
cd llcon-[version]/linux<br>
./llcon -s &<br>
./llcon<br>
- start client to connect to local host<br>
- close the server window (this will shut down the server)<br>
<br>
</body>
</html>