mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-27 23:17:24 +01:00
The microphone (SDL3 recording with Android's voice communication preset: echo cancelling, noise suppression) is encoded with Opus (VOIP, 16 kbit/s, 20 ms frames) while its level is over voice.threshold, and sent every tick in a new distributed message (_distributed_message_voice): clients to the host, which plays it and passes it on; the host its own to every client. Each speaker is decoded into a jitter buffer and mixed into a stream of its own, teammates over the radio, everyone else by distance (20 world units) and from their side of where the listener looks. Devices open on a thread of their own so the game never waits; the launcher asks for the microphone once and tells the game whether it may use it. Opus v1.5.2 is fetched and built statically into the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>