Hi! I am looking for a good C/C++ Mumble VoIP client library, and the FiveM implementation is very promising.
Other available libararies like mumlib or libmumble are old and/or feature-incomplete.
Is it possible to compile the voip-mumble of FiveM as a standalone library? Looking at the code, it seems to be heavily intertwined with other components.
voip-mumble itself should only be dependent on some of the helpers from shared/ and the build system for building protobuf/similar, as long as you remove the few scrBind* deps (and move back the libuv-based logic to what it was a few commits before).
it’s however also heavily Windows-specific, which might take a bit more effort to fix.
Windows-specific code is no problem, I’m only targeting Windows at the moment anyways.
Previously I tried to compile the code without using the FiveM build system, I manually added the botan, fmt, labsound (+nyquist), libuv, opus, protobuf, tbb, uvw and webrtc submodules with the same commits as FiveM. I also copied the net, net-base, net-tcp-server components, and the shared & client/shared resources.
After removing the mentioned scrBinds and replacing them with good old variables or shared pointers, I actually got the code to compile after adding everything to the include path - however linking failed because obviously the sources are not built and thus the symbols cant be resolved.
Is it possible to use you build system to selectivly build components?
Somewhat, yes: you can technically edit components/config.lua to disable a few for a custom game ID (defined in tools/build/* somewhere) and get a partial build, but some of it will try to runtime-link to CitiCore, however that might be tweakable a bit and perhaps even able to get static libraries (assuming you /FORCEINCLUDE all .obj files that contain an InitFunction).
If you’re planning to run net:tcp-server bits or another libuv loop it shouldn’t matter much, the new code is a tad more reliable than the old custom socket use.
Hi again! I managed to compile a working DLL (https://github.com/StarGate01/FiveMumblePatchset).
It took quite a bit of effort and a few compilation tricks. I compiled all dependencies into static libraries and then linked everything into a DLL. Also I implemented password auth.
And yes, I use tcp-server code, and it appears to work - TLS and Opus do what they are supposed to do.
However, I have a few questions concerning program flow. At the moment, Microphone input is successfully streamed to other (Stock Desktop Mumble) clients. However, no audio is played - I think this is because the library does not accept audio without positional data.
How do I initialize / use the code regarding audio output?