diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-07 14:38:46 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-07 14:38:46 +0000 |
commit | 1f46e87bfdfd90e5af9927af7e19bf29389ab27e (patch) | |
tree | c0749d9f0473d3abf60d71e0f57c7e320476bcf4 /code/client/cl_main.c | |
parent | c5f253e8b3c5b8907a568db81586885e0c71f9b5 (diff) | |
download | ioquake3-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_main.c')
-rw-r--r-- | code/client/cl_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c index cd6a146..0129558 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -310,14 +310,14 @@ void CL_CaptureVoip(void) } if ((cl_voipSend->integer) || (finalFrame)) { // user wants to capture audio? - // !!! FIXME: 8000, MONO16, 4096 samples are hardcoded in snd_openal.c int samples = S_AvailableCaptureSamples(); const int mult = (finalFrame) ? 1 : 12; // 12 == 240ms of audio. // enough data buffered in audio hardware to process yet? if (samples >= (clc.speexFrameSize * mult)) { // audio capture is always MONO16 (and that's what speex wants!). - static int16_t sampbuffer[4096]; // !!! FIXME: don't hardcode. + // 2048 will cover 12 uncompressed frames in narrowband mode. + static int16_t sampbuffer[2048]; int16_t voipPower = 0; int speexFrames = 0; int wpos = 0; |