aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 14:39:49 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 14:39:49 +0000
commit3140bde1ea10558f821c22baaa646a4f92b195af (patch)
tree45cbba7b32a10d4e2cf3009dcbf9a72eb7464f54 /code/client/cl_cgame.c
parent1f46e87bfdfd90e5af9927af7e19bf29389ab27e (diff)
downloadioquake3-aero-3140bde1ea10558f821c22baaa646a4f92b195af.tar.gz
ioquake3-aero-3140bde1ea10558f821c22baaa646a4f92b195af.zip
VoIP: Initial work on adding Speex preprocessor.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1373 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/cl_cgame.c')
-rw-r--r--code/client/cl_cgame.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c
index 1c7dd2b..18a9630 100644
--- a/code/client/cl_cgame.c
+++ b/code/client/cl_cgame.c
@@ -922,12 +922,20 @@ void CL_FirstSnapshot( void ) {
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.speexSamplingRate);
+ &clc.speexSampleRate);
+
+ clc.speexPreprocessor = speex_preprocess_state_init(clc.speexFrameSize,
+ clc.speexSampleRate);
+
+ i = 1;
+ speex_preprocess_ctl(clc.speexPreprocessor,
+ SPEEX_PREPROCESS_SET_DENOISE, &i);
for (i = 0; i < MAX_CLIENTS; i++) {
speex_bits_init(&clc.speexDecoderBits[i]);