Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For example, suppose my code can determine that upstream bandwidth is unusually limited. And suppose I'm using a fully-connected mesh topology combined with a UDP-like protocol for voice chat. Is there an established way to reduce the risk of packet loss so that the voice playback will either be solid or muted, but not jittery or choppy? This must be a solved problem in the VoIP world, but I'm not sure where to look.

EDIT: To clarify my abuse of the term jitter: I mean, if two UDP voice packets arrive out of order, the audio would sound jittery in a colloquial sense (i.e. I mean packet jitter, not audio signal displacement). The choppy sound I'm referring to is related, where a UDP packet is lost instead of arriving late and causes a gap or jump in the audio.

When I refer to muting the playback, I don't mean as a function of source input to avoid background noise. I mean on the receiving end of the conversation, if there's high packet loss, just stop playback instead of playing choppy audio.

share|improve this question
    
In the 'VoIP world', jitter control is a function of the specific codec employed. Buffers are used to 'pad' voice data to avoid jitter. Playback is attempted to be transmitted no matter what and never muted. Which codecs have you tried / implemented? As an afterthought, you could monitor the jitter buffers and 'mute' audio if the buffer level goes below a threshold. –  DrDeth Aug 15 '10 at 21:34
    
I abused the term jitter, which led to confusion. Sorry. I updated the question to clarify. The API I'm coding to is pretty robust, so the codec end of things works fine. –  BRaffle Aug 16 '10 at 14:00
    
After doing some more reading, I think understand what you're saying now with regard to using buffers to pad voice data and avoid jitter. That makes sense, thanks! It sounds effective but complicated to properly implement. –  BRaffle Aug 16 '10 at 14:04

1 Answer 1

up vote 1 down vote accepted

I'd recommend implementing the Real-time Transport Protocol (RTP), or something similar that suites your needs. It includes Quality of Service (QoS) monitoring with the RTP Control Protocol (RTCP) for minimizing "jittery" and "choppy" effects with audio streams.

Even if you don't need all the features of the protocol, it is worth investigating to see an example of how the issues you are experiencing are solved. However, you'll likely have to weigh the choppy/jittery effects against latency if the codec remains static. The consistency of the audio is improved by buffering and buffering takes time.

share|improve this answer
    
Exactly what I was looking for, thanks! –  BRaffle Aug 18 '10 at 11:18
    
topology.org/comms/rtp.html –  BRaffle Aug 18 '10 at 11:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.