mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-05 16:30:51 +00:00
VoIP: Don't lose gain for good if using VAD on disconnect.
This temporarily disables VAD so the system can clean up recording state.
This commit is contained in:
parent
c45fe80ea6
commit
28c48a8cf9
1 changed files with 4 additions and 0 deletions
|
@ -1155,8 +1155,12 @@ void CL_Disconnect( qboolean showMainMenu ) {
|
||||||
|
|
||||||
#if USE_VOIP
|
#if USE_VOIP
|
||||||
if (cl_voipSend->integer) {
|
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");
|
Cvar_Set("cl_voipSend", "0");
|
||||||
CL_CaptureVoip(); // clean up any state...
|
CL_CaptureVoip(); // clean up any state...
|
||||||
|
cl_voipUseVAD->integer = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clc.speexInitialized) {
|
if (clc.speexInitialized) {
|
||||||
|
|
Loading…
Reference in a new issue