diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-01 07:51:23 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-01 07:51:23 +0000 |
commit | 10afaeef337e0d19b37cb7dbe3fccee48bf18a43 (patch) | |
tree | 365da78a39bf90a8321da9f9bbf554ff5733eae6 /code/client/client.h | |
parent | 94017ca419caff91bf26841b503b5867d992ca4c (diff) | |
download | ioquake3-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/client.h')
-rw-r--r-- | code/client/client.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/code/client/client.h b/code/client/client.h index b064404..802e99f 100644 --- a/code/client/client.h +++ b/code/client/client.h @@ -34,6 +34,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "cl_curl.h" #endif /* USE_CURL */ +#if USE_VOIP +#include "speex/speex.h" +#endif + // file full of random crap that gets used to create cl_guid #define QKEY_FILE "qkey" #define QKEY_SIZE 2048 @@ -225,6 +229,30 @@ typedef struct { int timeDemoMaxDuration; // maximum frame duration unsigned char timeDemoDurations[ MAX_TIMEDEMO_DURATIONS ]; // log of frame durations +#if USE_VOIP + qboolean speexInitialized; + int speexFrameSize; + + // incoming data... + // !!! FIXME: convert from parallel arrays to array of a struct. + SpeexBits speexDecoderBits[MAX_CLIENTS]; + void *speexDecoder[MAX_CLIENTS]; + byte voipIncomingGeneration[MAX_CLIENTS]; + int voipIncomingSequence[MAX_CLIENTS]; + qboolean voipIgnore[MAX_CLIENTS]; + qboolean voipMuteAll; + + // outgoing data... + SpeexBits speexEncoderBits; + void *speexEncoder; + int voipOutgoingDataSize; + int voipOutgoingDataFrames; + int voipOutgoingSequence; + byte voipOutgoingGeneration; + byte voipOutgoingData[1024]; + float voipPower; +#endif + // big stuff at end of structure so most offsets are 15 bits or less netchan_t netchan; } clientConnection_t; @@ -372,6 +400,12 @@ extern cvar_t *cl_useMumble; extern cvar_t *cl_mumbleScale; #endif +#if USE_VOIP +extern cvar_t *cl_voipSend; +extern cvar_t *cl_voipGainDuringCapture; +extern cvar_t *voip; +#endif + //================================================= // @@ -426,6 +460,10 @@ extern kbutton_t in_mlook, in_klook; extern kbutton_t in_strafe; extern kbutton_t in_speed; +#if USE_VOIP +extern kbutton_t in_voiprecord; +#endif + void CL_InitInput (void); void CL_SendCmd (void); void CL_ClearState (void); @@ -447,6 +485,11 @@ void Key_SetCatcher( int catcher ); extern int cl_connectedToPureServer; extern int cl_connectedToCheatServer; +#if USE_VOIP +extern int cl_connectedToVoipServer; +void CL_Voip_f( void ); +#endif + void CL_SystemInfoChanged( void ); void CL_ParseServerMessage( msg_t *msg ); |