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.)
This commit is contained in:
parent
fe619680f8
commit
615b73288f
13 changed files with 167 additions and 240 deletions
|
@ -300,7 +300,8 @@ enum svc_ops_e {
|
|||
svc_EOF,
|
||||
|
||||
// new commands, supported only by ioquake3 protocol but not legacy
|
||||
svc_voip, // not wrapped in USE_VOIP, so this value is reserved.
|
||||
svc_voipSpeex, // not wrapped in USE_VOIP, so this value is reserved.
|
||||
svc_voipOpus, //
|
||||
};
|
||||
|
||||
|
||||
|
@ -316,7 +317,8 @@ enum clc_ops_e {
|
|||
clc_EOF,
|
||||
|
||||
// new commands, supported only by ioquake3 protocol but not legacy
|
||||
clc_voip, // not wrapped in USE_VOIP, so this value is reserved.
|
||||
clc_voipSpeex, // not wrapped in USE_VOIP, so this value is reserved.
|
||||
clc_voipOpus, //
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue