0

For some time I've been using gsm codec for network audio chat. Now I'd like to implement smth like speex or iLBC due to "voice prediction". As far as I understand i need timestamps for packets. Also I know that to make codec to predict voice I have to pass it NULL packet for example.

But I cannot understand the entire concept! I.e.: App sends packets 1,2,3,4,5,6. I receive 1,2,3,6. What must I do?

Receive 1 - Play it.

Receive 2 - Play it.

Receive 3 - Play it.

Receive 6 - Hmm... Play 4,5 as NULL and then play 6 ?

And what if too many packets will be lost?

Kev
  • 118,037
  • 53
  • 300
  • 385
Dalamber
  • 1,009
  • 1
  • 12
  • 32
  • 1
    I think the right term for what you're trying to do is "packet loss concealment". Maybe this will help you perform a better internet search. This is not my area of expertise, but a simple approach would be to remember the newest packet and discard it right after it was decoded. If the audio buffers are near empty and you need data to keep the audio stream alive, then just try to "make something up". – sellibitze Oct 26 '10 at 13:17
  • Thanks for the answer! I'll keep "googling" with packet loss concealment. But as for empty audio buffers - I need to determine somehow if they are empty because of packet loss or simply NO DATA need to be played. I shouldn't predict smth if the opponent does not transmit any voice at all... – Dalamber Oct 27 '10 at 06:36

1 Answers1

1

The comment by sellibitze helped me out:

I think the right term for what you're trying to do is "packet loss concealment". Maybe this will help you perform a better internet search. This is not my area of expertise, but a simple approach would be to remember the newest packet and discard it right after it was decoded. If the audio buffers are near empty and you need data to keep the audio stream alive, then just try to "make something up"

Community
  • 1
  • 1
Dalamber
  • 1,009
  • 1
  • 12
  • 32