| 1 |
ioquake3 VoIP support documentation. |
| 2 |
Last updated 6/25/2008 by Ryan C. Gordon. |
| 3 |
|
| 4 |
There are two ways to use VoIP in ioquake3. You can either use Mumble as an |
| 5 |
external program, for which ioq3 now supplies some basic hooks, or you can |
| 6 |
use the new built-in VoIP support. |
| 7 |
|
| 8 |
Mumble is here: http://mumble.sourceforge.net/ ... ioquake3 can supply it |
| 9 |
with your in-game position, but everything else is whatever features Mumble |
| 10 |
offers outside of the game. To use it, start Mumble before you start ioq3, |
| 11 |
and run the game with +set cl_useMumble 1. This should work on at least |
| 12 |
Linux, Mac OS X, and Windows, and probably other platforms Mumble supports |
| 13 |
in the future. |
| 14 |
|
| 15 |
The built-in stuff offers tighter in-game integration, works on any platform |
| 16 |
that ioquake3 supports, and doesn't require anything more than a recent build |
| 17 |
of the game. The rest of this document is concerned with the built-in VoIP |
| 18 |
support. |
| 19 |
|
| 20 |
|
| 21 |
Quick start for servers: |
| 22 |
- run a recent build of ioquake3. |
| 23 |
- Make sure your network settings are set to broadband. |
| 24 |
|
| 25 |
Quick start for clients: |
| 26 |
- run a recent build of ioquake3. |
| 27 |
- Make sure your network settings are set to broadband. |
| 28 |
- +set s_useOpenAL 1 |
| 29 |
- \bind q "+voiprecord" |
| 30 |
- Hook up a microphone, connect to a VoIP-supporting server. |
| 31 |
- hold down 'q' key and talk. |
| 32 |
|
| 33 |
|
| 34 |
Cvars you can set: |
| 35 |
|
| 36 |
sv_voip: set to "1" (the default) to enable server-side VoIP support. Set to |
| 37 |
"0" to disable. Without this, all VoIP packets are refused by the |
| 38 |
server, which means no one gets to use in-game VoIP. |
| 39 |
|
| 40 |
cl_voip: set to "1" (the default) to enable client-side VoIP support. Set to "0" |
| 41 |
to disable. Without this, you will neither be able to transmit voice nor |
| 42 |
hear other people. |
| 43 |
|
| 44 |
s_alCapture: set to "1" (the default) to have the audio layer open an OpenAL |
| 45 |
capture device. Without this set on sound startup, you'll never |
| 46 |
get bits from the microphone. This means you won't transmit, but |
| 47 |
you can still hear other people. |
| 48 |
|
| 49 |
cl_voipSendTarget: a string: "all" to broadcast to everyone, "none" to send |
| 50 |
to no one, "attacker" to send to the last person that hit |
| 51 |
you, "crosshair" to send to the people currently in your |
| 52 |
crosshair, "spatial" to talk to all people in hearing |
| 53 |
range or a comma-separated list of client numbers, like |
| 54 |
"0,7,2,23" ... an empty string is treated like "spatial". |
| 55 |
You can also use a mixed string like |
| 56 |
"0, spatial, 2, crosshair". |
| 57 |
This is reset to "spatial" when connecting to a new server. |
| 58 |
Presumably mods will manage this cvar, not people, but |
| 59 |
keybind could be useful for the general cases. To send to |
| 60 |
just your team, or the opposing team, or a buddy list, you |
| 61 |
have to set a list of numbers. |
| 62 |
|
| 63 |
cl_voipUseVAD: set to "1" to automatically send audio when the game thinks you |
| 64 |
are talking, "0" (the default) to require the user to manually |
| 65 |
start transmitting, presumably with a keybind. |
| 66 |
|
| 67 |
cl_voipVADThreshold: only used if cl_voipUseVAD is "1" ... a value between |
| 68 |
0.0 and 1.0 that signifies the volume of recorded audio |
| 69 |
that the game considers to be speech. You can use this |
| 70 |
to trim out breathing or perhaps the sound of your |
| 71 |
fingers tapping the keyboard and only transmit audio |
| 72 |
louder than that. You will have to experiment to find the |
| 73 |
value that works best for your hardware and play style. |
| 74 |
The default is "0.25", with "0.0" being silence and "1.0" |
| 75 |
being pretty-darn-loud. |
| 76 |
|
| 77 |
cl_voipSend: when set to "1", the game will capture audio from the microphone |
| 78 |
and transmit it, when "0", the game will not. The game can |
| 79 |
optimize for the "0" case (perhaps turning off audio recording). |
| 80 |
Lots of things set this on and off, including cl_voipUseVAD, so |
| 81 |
you probably should not touch this directly without knowing what |
| 82 |
you're doing, but perhaps mods can make use of it. |
| 83 |
|
| 84 |
cl_voipGainDuringCapture: This is the volume ("gain") of audio coming out of |
| 85 |
your speakers while you are recording sound for |
| 86 |
transmission. This is a value between 0.0 and 1.0, |
| 87 |
zero being silence and one being no reduction in |
| 88 |
volume. This prevents audio feedback and echo and |
| 89 |
such, but if you're listening in headphones that |
| 90 |
your mic won't pick up, you don't need to turn down |
| 91 |
the gain. Default is 0.2 (20% of normal volume). You |
| 92 |
ABSOLUTELY want to make your speakers quiet when you |
| 93 |
record, if the microphone might pick it up! |
| 94 |
|
| 95 |
cl_voipShowMeter: Set to "1" (the default) to show a volume meter as you are |
| 96 |
recording from the microphone, so you can see how well the |
| 97 |
game can "hear" you. Set to "0" to disable the display of |
| 98 |
the meter. |
| 99 |
|
| 100 |
cl_voipCaptureMult: Multiply recorded audio by this value after denoising. |
| 101 |
Defaults to 2.0 to _double_ the volume of your voice. |
| 102 |
This is to make you more audible if denoising eats away |
| 103 |
too much data. Set this to 1.0 to get no change, less to |
| 104 |
be quieter. |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
Console commands: |
| 109 |
|
| 110 |
voip ignore <clientnum> |
| 111 |
Turn off incoming voice from player number <clientnum>. This will refuse to |
| 112 |
play any incoming audio from that player, and instruct the server to stop |
| 113 |
sending it, to save bandwidth. Use unignore to reenable. This is reset to |
| 114 |
unignored when (re)connecting to a server. |
| 115 |
|
| 116 |
voip unignore <clientnum> |
| 117 |
Turn on incoming voice from player number <clientnum>. This will start |
| 118 |
playing audio from this player again if you've previously done a "voip |
| 119 |
ignore", and instruct the server to start sending her voice packets to |
| 120 |
you again. |
| 121 |
|
| 122 |
voip muteall |
| 123 |
Turn off all incoming voice. This will refuse to play any incoming audio, |
| 124 |
and instruct the server to stop sending it, to save bandwidth. Use |
| 125 |
unmuteall to reenable. This is reset to unmuted when (re)connecting to |
| 126 |
a server. |
| 127 |
|
| 128 |
voip unmuteall |
| 129 |
Turn on incoming voice. This will start playing audio again if you've |
| 130 |
previously done a "voip muteall", and instruct the server to start |
| 131 |
sending voice packets to you again. |
| 132 |
|
| 133 |
voip gain <clientnum> <gain> |
| 134 |
Sets the volume ("gain") for player number <clientnum> to <gain> ... |
| 135 |
A gain of 0.0 is silence, and 2.0 doubles the volume. Use this if someone |
| 136 |
is too quiet or too loud. |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
Actions: |
| 142 |
|
| 143 |
+voiprecord: The action you should bind to a key to record. This basically |
| 144 |
toggles cl_voipSend on and off. You don't need this if you're |
| 145 |
using cl_voipUseVAD, since that'll just record all the time and |
| 146 |
decide what parts of the recording are worth sending. |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
More detailed/technical info: |
| 151 |
|
| 152 |
By default, all of this is enabled. You can build with or without VoIP |
| 153 |
support explicitly with USE_VOIP=[1|0] on the make command line. |
| 154 |
|
| 155 |
You currently must use OpenAL to speak, as we have ALC_EXT_capture support |
| 156 |
in place to pull data from the microphone. If you are using the SDL backend, |
| 157 |
you can still hear people, but not speak. |
| 158 |
|
| 159 |
There is no in-game UI to speak of: we encourage mods to add some. Largely |
| 160 |
they will just need to set cvars and run console commands for choosing |
| 161 |
voice targets and ignoring people, etc. |
| 162 |
|
| 163 |
This requires patched builds to be useful, but remains network compatible with |
| 164 |
legacy quake3 clients and servers. Clients and servers both report in their |
| 165 |
info strings whether they support VoIP, and won't send VoIP data to those not |
| 166 |
reporting support. If a stray VoIP packet makes it to a legacy build, it will |
| 167 |
be ignored without incident. |
| 168 |
|
| 169 |
VoIP packets are saved in demo files! You will be able to playback what you |
| 170 |
heard and what you said on VoIP-compatible clients. Legacy clients can also |
| 171 |
play demo files with VoIP packets in them, but just won't play the voice |
| 172 |
track. For VoIP-supported builds, it's nice to have a record of the |
| 173 |
trash-talk. |
| 174 |
|
| 175 |
Data is processed using the Speex narrowband codec, and is cross-platform. |
| 176 |
Bigendian and littleendian systems can speak to each other, as can 32 and |
| 177 |
64-bit platforms. |
| 178 |
|
| 179 |
Bandwidth: VoIP data is broken up into 20 millisecond frames (this is a Speex |
| 180 |
requirement), and we try to push up to 12 Speex frames in one UDP packet |
| 181 |
(about a quarter of a second of audio)...we're using the narrowband codec: |
| 182 |
8000Hz sample rate. In practice, a client should send about 2 kilobytes per |
| 183 |
second more when speaking, spread over about four bursts per second, plus a |
| 184 |
few bytes of state information. For comparison, this is less than the server |
| 185 |
sends when downloading files to the client without an http redirect. The |
| 186 |
server needs to rebroadcast the packet to all clients that should receive it |
| 187 |
(which may be less than the total connected players), so servers should |
| 188 |
assume they'll need to push (number of players speaking at once times number |
| 189 |
of people that should hear it) * 2 kilobytes per second. It shouldn't be a |
| 190 |
problem for any client or server on a broadband connection, although it may |
| 191 |
be painful for dialup users (but then again, everything is. They can just |
| 192 |
disable the cvar). The game will refuse to enable VoIP support if your have |
| 193 |
your network settings lower than "Cable/xDSL/LAN", just in case. |
| 194 |
|
| 195 |
The initial VoIP work was done by Ryan C. Gordon <[email protected]>, and |
| 196 |
he can be contacted with technical questions, if the ioq3 mailing list or |
| 197 |
forums aren't helpful. |
| 198 |
|
| 199 |
// end of voip-README.txt ... |
| 200 |
|
| 201 |
|
| 202 |
|