mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.43k stars 1.12k forks source link

Positional Audio not working for locally playing people #2208

Open davidebeatrici opened 8 years ago

davidebeatrici commented 8 years ago

One common problem to every Positional Audio plugin that has context support with the server IP (Left 4 Dead 2 and Quake Live for example) is that if a player is hosting the game (playing locally), he can't hear Positional Audio for other players and viceversa. This happens because the memory address that has the IP Address displays a string like "loopback" or "localhost" when playing locally.

I found 3 possible ways to fix this:

  1. Get the public IP address using Mumble's feature (User Information).
  2. Get the public address by coding the plugin to get it from a webpage like this one: http://checkip.dyndns.com/
  3. Stop using the server IP address and use Server name/Map/Max players/Gamemode.

However, there are some problems with each of the options: 1 and 2: If two or more players are playing in a LAN there are clearly two problems: they connect using the local IP, not the public one; this means that the Positional Audio will not work between them and the people external to their home network because of the different context. Also, if one of them is hosting and playing on same computer, he will not hear the other players' Positional Audio and viceversa. 3: Will work for anyone, but it is an inaccurate method, because there might be identical servers.

Feel free to explain your idea if you have one :smile:

Kissaki commented 8 years ago

As long as people can connect to the server via different aliases, this is not trivial to solve.

We could ask the plugins to provide a unique server ID, and depending on the game, that may be available.

We could ask the plugins to provide a list of possible server addresses, but that is not trivial to provide by the plugins either.

davidebeatrici commented 8 years ago

Unique server ID? I didn't even think about it, this is a nice idea :wink: The problem is that probably it is available only in a few games and on online servers... I think that the best solution (for now) is the one I proposed here: https://github.com/mumble-voip/mumble/issues/2227 I will try anyway to search for a unique server ID, maybe I will find it if we're lucky enough :smile:

hacst commented 8 years ago

The server really doesn't care what's in context. It's up to the plugin to choose something to put in there to uniquely identify a game. It's just that the IP:PORT combination for the server is an easy to locate indentifier that works in a lot of situations. If there's a more robust one that works for more situations there is not reason at all to fixate on having the IP in context.

davidebeatrici commented 8 years ago

Source Engine gameservers have an identifier, very similar to Steam UserIDs. I will give a look into it :wink: