You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

203 lines

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