StarGate01 / AmongUs-Mumble

Mumble VoIP Plugin and mod for the popular game "Among Us" to enable Proximity Voice Chat.
GNU General Public License v3.0
109 stars 13 forks source link

Allow hotlinking to Mumble during game #27

Closed StarGate01 closed 3 years ago

StarGate01 commented 3 years ago

Is your feature request related to a problem? Please describe. Users can't link Mumble when the game is already running, as the initialization is only performed once at game start.

Describe the solution you'd like If Mumble is not linked, periodically check if it can be linked.

Additional context We can use a mechanism similar to the heartbeat loop.

alisenai commented 3 years ago

As per 83436af272f9f4330fb65b6af3358b1db7222a47, this is now implemented.

@StarGate01 does this include Mumble closing/restarting mid-game? If not, feel free to close the issue.

StarGate01 commented 3 years ago

Thank you!

I moved the reconnection to a background thread, see 8fda5315f28db784aa2ff967810d37c53696814e. The following works now:

I noticed that Mumble sometimes needs up to 10 seconds to realize a link has been established, but there is nothing we can really do about that. Maybe add it to the FAQ so users are patient.

Edit: The background thead was originally meant to check for connection loss in the middle of the game, but I did not implement that. That would require enumerating open file handles on the shared memory file or listing running processes.