aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 14:38:46 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 14:38:46 +0000
commit1f46e87bfdfd90e5af9927af7e19bf29389ab27e (patch)
treec0749d9f0473d3abf60d71e0f57c7e320476bcf4 /code/client/cl_cgame.c
parentc5f253e8b3c5b8907a568db81586885e0c71f9b5 (diff)
downloadioquake3-aero-1f46e87bfdfd90e5af9927af7e19bf29389ab27e.tar.gz
ioquake3-aero-1f46e87bfdfd90e5af9927af7e19bf29389ab27e.zip
VoIP: Don't hardcode Speex sample rate.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1372 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/cl_cgame.c')
-rw-r--r--code/client/cl_cgame.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c
index e93a73e..1c7dd2b 100644
--- a/code/client/cl_cgame.c
+++ b/code/client/cl_cgame.c
@@ -923,6 +923,12 @@ void CL_FirstSnapshot( void ) {
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.speexSamplingRate);
+
for (i = 0; i < MAX_CLIENTS; i++) {
speex_bits_init(&clc.speexDecoderBits[i]);
speex_bits_reset(&clc.speexDecoderBits[i]);
@@ -930,8 +936,6 @@ void CL_FirstSnapshot( void ) {
clc.voipIgnore[i] = qfalse;
clc.voipGain[i] = 1.0f;
}
- speex_encoder_ctl(clc.speexEncoder, SPEEX_GET_FRAME_SIZE,
- &clc.speexFrameSize);
clc.speexInitialized = qtrue;
clc.voipMuteAll = qfalse;
Cmd_AddCommand ("voip", CL_Voip_f);