diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-12-10 21:14:13 -0600 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:50:43 +0100 |
commit | 975d4d97e4b9459c3d21b4dc3ecd807e9c330d9a (patch) | |
tree | ff58ec02fe6d22a097f71d1163c3527bc9abcea1 /src/server/sv_init.c | |
parent | fae2cb94e089fabe9a69d0909a5c25e1014cb25f (diff) |
Use Opus for VoIP
Server/client VoIP protocol is handled by adding new cvars
cl_voipProtocol and sv_voipProtocol, sv_voip and cl_voip
are used to auto set/clear them. All users need to touch
are cl/sv_voip as 0 or 1 just like before.
Old Speex VoIP packets in demos are skipped.
New VoIP packets are skipped in demos if sv_voipProtocol
doesn't match cl_voipProtocol.
Notable difference between usage of speex and opus codecs,
when using Speex client would be sent 80ms at a time.
Using Opus, 60ms is sent at a time. This was changed because
the Opus codec supports encoding up to 60ms at a time.
(Simpler to send only one codec frame in a packet.)
Diffstat (limited to 'src/server/sv_init.c')
-rw-r--r-- | src/server/sv_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c index 30fd3936..997d58f6 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -646,8 +646,9 @@ void SV_Init (void) sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO ); #ifdef USE_VOIP - sv_voip = Cvar_Get("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH); + sv_voip = Cvar_Get("sv_voip", "1", CVAR_LATCH); Cvar_CheckRange(sv_voip, 0, 1, qtrue); + sv_voipProtocol = Cvar_Get("sv_voipProtocol", sv_voip->integer ? "opus" : "", CVAR_SYSTEMINFO | CVAR_ROM ); #endif Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); |