Jump to content
Mumble forums

Using MumbleLink


LilyC
 Share

Recommended Posts

Hello, I am interested in using Mumble in my game. I was looking at the instructions here (https://wiki.mumble.info/wiki/Link) which explain how to link Mumble to the game. However, I am curious what linking the game to Mumble actually does- does this allow the game to use the Mumble functionality itself (for example, having the ability to press X button in my game to mute myself using Mumble's mute functionality) or does it accomplish something more similar to a plugin to where you can enable the overlay? I am interested in having the ability to incorporate Mumble's abilities into my game rather than having the user launch Mumble as a separate application when playing. Any information/help would be appreciated! :)

Link to comment
Share on other sites

  • Administrators

Link is only there to transmit data about player's location to Mumble so that Mumble's positional audio feature can work with the used game.

 

Interfacing with Mumble in the way you have described is not really possible yet. In 1.4.0 however there will be a plugin framework (see https://github.com/mumble-voip/mumble/pull/3743). With that you will be able to create a custom plugin that can interface with Mumble via the API and can interface with your game via a custom interface.

Alternatively https://github.com/mumble-voip/mumble-json-bridge (also requires the plugin framework) could be interesting for you as well.

 

EDIT: Integrating Mumble into your game is currently not really possible since the graphical frontend and the functional backend are tightly intertwined. Thus you can't use our implementation as a backend in a game. We are working towards this possibility but this will be a long way.

Thus I think the best thing you could offer as of now would be to automatically start Mumble.

Link to comment
Share on other sites

Quote

I am interested in having the ability to incorporate Mumble's abilities into my game rather than having the user launch Mumble as a separate application when playing. Any information/help would be appreciated! 🙂

Isn't that what https://github.com/mumble-voip/libmumble was intended for? But I guess it is not up-to-date really. 

Edited by zsawyer
Link to comment
Share on other sites

Thank you for your responses! I am building the game with Visual Studio 2017, so I was looking into libmumble, though I am not confident it will compile/work due to it being so old (I also found a couple of different versions and wasn't sure of the differences between them anyway). I was also looking at using Whisper but ran into the same issue where it was built with very old tools and I have not been able to build it with VS 2017. To my knowledge, there is no recent project similar to Whisper that is built on top of Mumble to work with OpenSim (which is what I am using for the game).

On 2/25/2021 at 1:28 PM, Krzmbrzl said:

In 1.4.0 however there will be a plugin framework (see https://github.com/mumble-voip/mumble/pull/3743). With that you will be able to create a custom plugin that can interface with Mumble via the API and can interface with your game via a custom interface.

Alternatively https://github.com/mumble-voip/mumble-json-bridge (also requires the plugin framework) could be interesting for you as well.

I was able to build Mumble 1.4.0, so I will definitely look into interfacing and look into the JSON bridge. The Mumble API seems useful- do you know if there is any documentation on all of functions available/how they work? For the most part, the function names seem intuitive, but I am still looking for good documentation on it.

Link to comment
Share on other sites

  • Administrators
On 3/1/2021 at 6:21 PM, LilyC said:

do you know if there is any documentation on all of functions available/how they work? For the most part, the function names seem intuitive, but I am still looking for good documentation on it.

As of now the documentation lives in the source file of the original C headers in my fork: https://github.com/Krzmbrzl/mumble/blob/plugin-API/plugins/MumbleAPI_v_1_0_x.h and https://github.com/Krzmbrzl/mumble/blob/plugin-API/plugins/MumblePlugin_v_1_0_x.h.

 

If you are using C++, then I recommend using https://github.com/mumble-voip/mumble-plugin-cpp instead of the plain C headers.

 

If you are looking for a sample implementation you can have a look at https://github.com/Krzmbrzl/mumble/blob/plugin-API/plugins/testPlugin/testPlugin.cpp for the plain C interface.

 

On 3/1/2021 at 6:21 PM, LilyC said:

I was able to build Mumble 1.4.0

Note however that you have to build from my fork (from the linked pull request) as the plugin framework did not yet find its way into the main repo. As such it is also not guaranteed to remain unchanged yet. Thus if you want to test it out early, you might have to adapt a thing or two that might get changed in the meantime.

 

 

As a further alternative I can also point you to PyMumble: https://github.com/azlux/pymumble

This is a Python standalone implementation of parts of the Mumble protocol. You could either reimplement the relevant parts into your game or find a way to use the Python library directly...

Link to comment
Share on other sites

Thank you for the links to documentation!

I am using C++ with my game. I was able to build your forked version, and am now looking into the plugin you mentioned. However, I am a little confused on what to do with it. For example, I built the example plugin, and now have an example.dll, example.lib, etc. How would I utilize these files? Am I meant to add the dll through Mumble's plugin settings? Or maybe use the files in a future build of Mumble? I am confused how your fork and mumble-plugin-cpp are meant to be tied together. Perhaps I am misunderstanding in general how it is supposed to be used.

Link to comment
Share on other sites

  • Administrators
On 3/5/2021 at 8:00 PM, LilyC said:

Am I meant to add the dll through Mumble's plugin settings?

That's still on my ToDo list.

 

For now you can either place the DLLs in the proper directory manually (not recommended) or start Mumble from a command-line, providing the path to the DLL as the last argument. So for instance

mumble.exe path/to/the/plugin.dll

That should open the plugin installer that will install the plugin for you. After that, you will find an entry for it in Settings -> Plugins where you have to enable it.

Link to comment
Share on other sites

I have a similar issue that I'm dealing with in my development. I've also followed Krzmbrzl's instructions but I think I'm in the same boat as LilyC and am slightly confused. Forgive me if this is a dumb question but how would I make my software talk to Mumble through that plugin?

Link to comment
Share on other sites

  • Administrators

Communication between the plugin and Mumble is easy. The plugin is presented with an API that it can use and it can also include callbacks that Mumble will call as appropriate.

How you are going to talk with the plugin is completely up to you. You could either use shared memory, (named) pipes, sockets, ... The keyword you are looking for in this context is inter-process communication (IPC): https://en.wikipedia.org/wiki/Inter-process_communication

Link to comment
Share on other sites

  • 4 months later...

I was trying to get my program to talk to the plugin using sockets. I am curious how onReceiveData() in MumblePlugin.h is meant to work- is it a listener on the address and port a user is connected to on Mumble, or something entirely different? What triggers it?

If this is not the way to go for socket connections, is there a different easy way to use sockets with the plugin?

Link to comment
Share on other sites

  • Administrators
12 hours ago, LilyC said:

I am curious how onReceiveData() in MumblePlugin.h is meant to work- is it a listener on the address and port a user is connected to on Mumble, or something entirely different? What triggers it?

It is something different. The plugin API allows for plugins running on different clients but that are connected to the same server to send messages to each other. And messages sent this way are then received via the onReceiveData function on the receiving end. The traffic goes through the regular Mumble connection though and not through any external ports or sockets.

Link to comment
Share on other sites

  • Administrators
12 hours ago, LilyC said:

If this is not the way to go for socket connections, is there a different easy way to use sockets with the plugin?

You'll have to implement that yourself or (probably easier) use a library in your plugin that provides you with this functionality. It will end up being exactly as easy/hard to do as in a regular C/C++ program.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...