Implement voice chat (VoIP)#303
Conversation
|
What is the workflow/usage around |
|
@hemebond I overwritten the commit. |
Not sure. I believe "voipgroup" and "voiplistengroup" should mean only can talk and listen in such group of people while others can't talk and listen in that same one. Imagine playing team gamemodes like Team Deathmatch, Capture The Flag, Prop Hunt, Trouble in Terrorist Town, ... Also in normal gamemodes, while being a spectator and you don't play, you would wanna talk with the spectators without disturbing the players. |
When it's merged into main/master your PR should be squash merged, yes. So you can just add commits to your PR. |
So I'm having a bit of trouble getting it to work reliably. With player 1 (listen host) sending voip ( and no sound. Not sure how I got it to work previously. |
Signed-off-by: LegendaryGuard <rootuser999@gmail.com>
|
The new QuakeC fields and functions should probably also be added to the dpdefs files; otherwise modders won't know about them. EDIT: I've created #306 as a follow up task for myself to add the defs after I've tested them. |
…se may be defined to access VoIP from the VM
… to know that these functions can be used in CSQC
|
Not gonna merge this yet because we want to track FTEQW compatibility as closely as possible. We want to make sure this at least won't complicate FTEQW compatibility later. So consider this pending or "will merge what ever it takes eventually". Definitely not saying no to the Opus capture plumbing at least. |
|
On closer review: absolutely not. I'll merge everything except the extension. This creates a parallel mini protocol on raw UDP with the magic bytes "VOIP" and yells it directly into the bowels of the audio subsystem. Demos won't be able to record voice, it doesn't benefit from the same serialization and debugging ability as the protocol layer and its own bounds and sanity checks. It's not something I'm comfortable upstreaming. FTE uses a pair of netmessages, and so does Source and GoldSrc. I'd rather we go that route than trying to sidestep the Quake protocol state machine. Yeah it's insane to mint a new protocol number every new feature we add. So FTE pext is something we want to consider eventually. But this is a recipe for some fun extra bugs from edge cases because it doesn't go through an existing battle tested path that everything else does. |
… of DP maintainers
|
@Cloudwalk9 I just did that at 5b91d28 regarding your reply, anything else? |
|
@LegendaryGuard I will merge basically everything except the networking bits. We'll have to do that ourselves but that's the "easy" and fun part. The audio capture plumbing is fine, which is the soul-crushing, gruelling boilerplate part. And we want it in Opus anyway. I want VoIP too, but not brute forced. We have to do this right. Once an extension is implemented, if mods start depending on it and it's categorically unserviceable without breaking compatibility due to design or intrinsic security concerns, there's no Ctrl+Z. |
|
I should remind people that they're implementing the equivalent of a syscall for certain things. It's a contract rather than a mere feature. If it's found to be faulty and applications depend on its behavior, but the fault is part of the behavior, it cannot be fixed without breaking applications. No amount of shim magic in the world will fix that. There's no going back quickly and technical debt is accrued. That's also why compatibility layers strive for bug-for-bug compatibility. Because even the bugs define the contract. Could I merge this as-is? I mean, I'd probably keep it disabled by default. But it's also a matter of willingness to maintain two parallel VoIP implementations and fixing its inevitable security bugs. We generally do not wish to become a compatibility layer bazaar for everyone's new thing in their own fork or port. We have our own compatibility issues with stock Quake and its mods as it is. |
|
Understandable. I really appreciate you reviewing completely the feature in great detail. 👍 We could summon So, I opened an issue in their own engine where handles that implementation. |
Closes #61
With
DP_RM_VOIPextension, use one of my branches to experiment with QuakeC: https://github.com/LegendaryGuard/darkplaces/tree/LegendaryGuard/DP_RM_VOIPyou're free to do whatever there.
That implementation came from DarkPlaces RM.
This feature can be tested on the latest version of Rexuiz, just bind the key of the voice chat feature, press and hold the binded key, and speak, everyone will hear the voice and noises of who enables it if the microphone is on.
Uses OPUS.
Added cvars:
sv_voip: Enable voip support in serversv_voip_echo: Echo mode for VOIP, for testing purposesv_voip_force: Force VOIP between players, even if QuakeC didn't want itvoipvolume: volume of voipsnd_input_boost: Audio input boostsnd_input_boost_auto: Audio input boostAdded commmands:
snd_list_input_devices: list input audio devicessnd_set_input_device: set input audio devicesnd_echo_start: start microphone echo testsnd_echo_stop: stop microphone echo testTo bind keys:
+snd_voip_talk: start voip-snd_voip_talk: stop voipNOTE: Feel free to tweak the code and contribute, you can open other new PR as copy of that if I'm not active.
Anyone is free to copy the code, it's GPL-licensed.
P.D. If the owners/maintainers don't agree, feel free to fork my branch repository and do experiments.