ioquake/ioq3 — pull request #25 by zturtleman (2013-12-11 03:38:36+00:00)
Title: 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. (Allows for changing cl/sv_voipProtocol in the future.)

Notable difference between usage of speex and opus codecs, when using Speex client would be sent 80ms at a time (using multiple speex frames). 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.)

I think it's in working order and ready to commit, but should probably be reviewed/tested. I've only tested recording demos and playing them back.