diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 11:52:53 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:28 +0000 |
commit | b47a49a03370e7ea42f47623b9f72a5ca799f0e7 (patch) | |
tree | 9d64d778ded2971d7ebd05970d903d886bd81436 /src/client/cl_cgame.c | |
parent | 09ceb08b95978feb0a9b737f22ac0f662c7465d6 (diff) |
* Merge ioq3-r1423
+ IPv6
+ VoIP
+ Stereo rendering
+ Other minor stuff
Diffstat (limited to 'src/client/cl_cgame.c')
-rw-r--r-- | src/client/cl_cgame.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/client/cl_cgame.c b/src/client/cl_cgame.c index 2e28d049..6e436316 100644 --- a/src/client/cl_cgame.c +++ b/src/client/cl_cgame.c @@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // cl_cgame.c -- client system interaction with client game #include "client.h" +#include "libmumblelink.h" extern qboolean loadCamera(const char *name); extern void startCamera(int time); @@ -955,6 +956,52 @@ void CL_FirstSnapshot( void ) { Cbuf_AddText( cl_activeAction->string ); Cvar_Set( "activeAction", "" ); } + +#ifdef USE_MUMBLE + if ((cl_useMumble->integer) && !mumble_islinked()) { + int ret = mumble_link(CLIENT_WINDOW_TITLE); + Com_Printf("Mumble: Linking to Mumble application %s\n", ret==0?"ok":"failed"); + } +#endif + +#ifdef USE_VOIP + if (!clc.speexInitialized) { + int i; + speex_bits_init(&clc.speexEncoderBits); + speex_bits_reset(&clc.speexEncoderBits); + + clc.speexEncoder = speex_encoder_init(&speex_nb_mode); + + speex_encoder_ctl(clc.speexEncoder, SPEEX_GET_FRAME_SIZE, + &clc.speexFrameSize); + speex_encoder_ctl(clc.speexEncoder, SPEEX_GET_SAMPLING_RATE, + &clc.speexSampleRate); + + clc.speexPreprocessor = speex_preprocess_state_init(clc.speexFrameSize, + clc.speexSampleRate); + + i = 1; + speex_preprocess_ctl(clc.speexPreprocessor, + SPEEX_PREPROCESS_SET_DENOISE, &i); + + i = 1; + speex_preprocess_ctl(clc.speexPreprocessor, + SPEEX_PREPROCESS_SET_AGC, &i); + + for (i = 0; i < MAX_CLIENTS; i++) { + speex_bits_init(&clc.speexDecoderBits[i]); + speex_bits_reset(&clc.speexDecoderBits[i]); + clc.speexDecoder[i] = speex_decoder_init(&speex_nb_mode); + clc.voipIgnore[i] = qfalse; + clc.voipGain[i] = 1.0f; + } + clc.speexInitialized = qtrue; + clc.voipMuteAll = qfalse; + Cmd_AddCommand ("voip", CL_Voip_f); + Cvar_Set("cl_voipSendTarget", "all"); + clc.voipTarget1 = clc.voipTarget2 = clc.voipTarget3 = 0x7FFFFFFF; + } +#endif } /* |