From 3d049fcb199f0ab80866011435afdb697bb366e6 Mon Sep 17 00:00:00 2001 From: Adidasman1 Date: Tue, 26 Jan 2016 19:07:04 +0400 Subject: [PATCH] Uncommented limiter voice and default voice codex speex for everyone. --- revoice/src/revoice_main.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/revoice/src/revoice_main.cpp b/revoice/src/revoice_main.cpp index acc30da..12ed5c2 100644 --- a/revoice/src/revoice_main.cpp +++ b/revoice/src/revoice_main.cpp @@ -9,9 +9,8 @@ void Rehlds_ClientConnected_Hook(IRehldsHook_ClientConnected* chain, IGameClient CRevoicePlayer* plr = GetPlayerByClientPtr(cl); plr->OnConnected(protocol); - if (protocol == 47) { - plr->InitVoice(vct_speex); - } + // default codec + plr->InitVoice(vct_speex); //for p48 we will query sv_version cvar value later in mm_ClientConnect } @@ -101,8 +100,8 @@ void SV_ParseVoiceData_emu(IGameClient* cl) { switch (srcPlayer->GetCodecType()) { case vct_silk: { - //if (nDataLength > MAX_SILK_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_SILK_VOICE_RATE) - //return; + if (nDataLength > MAX_SILK_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_SILK_VOICE_RATE) + return; silkData = chReceived; silkDataLen = nDataLength; speexData = transcodedBuf; @@ -111,8 +110,8 @@ void SV_ParseVoiceData_emu(IGameClient* cl) { } case vct_speex: - //if (nDataLength > MAX_SPEEX_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_SPEEX_VOICE_RATE) - //return; + if (nDataLength > MAX_SPEEX_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_SPEEX_VOICE_RATE) + return; speexData = chReceived; speexDataLen = nDataLength; silkData = transcodedBuf;