aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-01 07:51:23 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-01 07:51:23 +0000
commit10afaeef337e0d19b37cb7dbe3fccee48bf18a43 (patch)
tree365da78a39bf90a8321da9f9bbf554ff5733eae6 /code/client/cl_cgame.c
parent94017ca419caff91bf26841b503b5867d992ca4c (diff)
downloadioquake3-aero-10afaeef337e0d19b37cb7dbe3fccee48bf18a43.tar.gz
ioquake3-aero-10afaeef337e0d19b37cb7dbe3fccee48bf18a43.zip
Initial patch for in-game VoIP support!
git-svn-id: svn://svn.icculus.org/quake3/trunk@1348 edf5b092-35ff-0310-97b2-ce42778d08ea
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
}
/*