From 0cfbb51836fefc35f6e1aa612d6bc77203d6b1d3 Mon Sep 17 00:00:00 2001 From: icculus Date: Sun, 8 Jun 2008 08:24:38 +0000 Subject: VoIP: Don't lose gain for good if using VAD on disconnect. This temporarily disables VAD so the system can clean up recording state. git-svn-id: svn://svn.icculus.org/quake3/trunk@1381 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 13de133..7959bd0 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -1155,8 +1155,12 @@ void CL_Disconnect( qboolean showMainMenu ) { #if USE_VOIP if (cl_voipSend->integer) { + int tmp = cl_voipUseVAD->integer; + cl_voipUseVAD->integer = 0; // disable this for a moment. + clc.voipOutgoingDataSize = 0; // dump any pending VoIP transmission. Cvar_Set("cl_voipSend", "0"); CL_CaptureVoip(); // clean up any state... + cl_voipUseVAD->integer = tmp; } if (clc.speexInitialized) { -- cgit v1.2.3