aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/client/cl_cgame.c')
-rw-r--r--code/client/cl_cgame.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c
index 334294e..7ea1b1d 100644
--- a/code/client/cl_cgame.c
+++ b/code/client/cl_cgame.c
@@ -916,6 +916,26 @@ void CL_FirstSnapshot( void ) {
Com_Printf("Mumble: Linking to Mumble application %s\n", ret==0?"ok":"failed");
}
#endif
+
+#if 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);
+ 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;
+ }
+ speex_encoder_ctl(clc.speexEncoder, SPEEX_GET_FRAME_SIZE,
+ &clc.speexFrameSize);
+ clc.speexInitialized = qtrue;
+ clc.voipMuteAll = qfalse;
+ Cmd_AddCommand ("voip", CL_Voip_f);
+ }
+#endif
}
/*