- Allow changing cl_voip without restarting.

- Fix assert failing in CL_ParseVoip() while flipping cl_voip off and on.
This commit is contained in:
Zack Middleton 2012-12-14 07:32:07 +00:00
parent 50475fc37b
commit d79ea2e5cd
2 changed files with 21 additions and 15 deletions

View file

@ -769,7 +769,7 @@ void CL_ParseVoip ( msg_t *msg ) {
// reset the bits just in case.
speex_bits_reset(&clc.speexDecoderBits[sender]);
seqdiff = 0;
} else if (seqdiff > 100) { // more than 2 seconds of audio dropped?
} else if (seqdiff * clc.speexFrameSize * 2 >= sizeof (decoded)) { // dropped more than we can handle?
// just start over.
Com_DPrintf("VoIP: Dropped way too many (%d) frames from client #%d\n",
seqdiff, sender);