Testing sounds on individual multiplayer clients

Hey,
when you are testing for a multiplayer game with multiple clients running at once inside the engine (New Editor PIE), are you able to disable the audio of specific clients, or allow only one to play? Inside the engine there is the command “SoloAudio”, which will mute all other players, and I’m looking for an identical or similar function for sounds coming from FMod. Thanks in advance!

I’m afraid I don’t really understand what you’re asking. What do you mean by “disabling the audio of specific clients?” Do you mean disabling player voice chat, or disabling all events associated with other players in a multiplayer game?

The 3D behavior of events (including audibility-based virtualization, attenuation, and panning) is based on their position relative to the listener(s).
For network multiplayer games, each local copy of the game runs its own local copy of the FMOD Engine, which handles the 3D behavior of events by comparing them to a single listener position associated with that copy of the game. In such a game, the audibility of diagetic events is based on their audibility to the local player, while non-diagetic UI sounds associated with other players should not be triggered.
For local multiplayer games, the FMOD engine supports multiple listeners, and handles the 3D behavior of events by comparing them to all listener positions, as per our documentation on the subject. In such a game, you can “deafen” other players by reducing the weights of their associated listeners to 0, essentially removing their impact on the audibility and panning of events.

Does that answer your question?

Sorry for not being precise enough, perhaps an example would help to clear what Im trying to say. When testing multiplayer in Ue4, its common to have e.g 2-3 instances running at once ( server, client a, client b). Now the first problem is that all of them play their own individual background music, so its annoying to test whether a certain sound works on a certain client, because you hear the sounds of 3 clients. Its as if you have a game open 3 times. Unreal by default has a command that fixes this by disabling all other clients audio, except the one that you executed the command on. My question is if there is something similar for Fmod.

Are these clients intended for split-screen multiplayer, or for playing over a network? I ask because this likely determines whether your game uses one FMOD Studio system with multiple listeners or one FMOD Studio system and listener per client, which will have a substantial effect on what events are associated with specific listeners and thus on the process involved in muting events associated with specific clients.

Its supposed to be played over a network. I hope my point comes through, I don’t want a permanent “mute client x” button, but rather a debug method to isolate a certain client to see if their sounds work as intended. And to do so, I need to do certain actions with another client, such as scoring a goal, which is why I need multiple clients running at once for testing purposes.

Thanks for clarifying your situation.

From what you’ve said, each client is running its own instance of the FMOD Studio system. This is because the FMOD Engine does not communicate with other instances of the FMOD engine running over a network; to do so would consume bandwidth unnecessarily. Instead, each instance of the FMOD Engine runs totally independently, and acts only on the information fed to it by the game’s code. As such, there is and can be no “mute client X” button or command in FMOD Studio, because no instance of the FMOD Studio system is aware that there are multiple clients to choose from.

What can and does exist is the option to “mute everything on this client.” The easiest way to do this would be to set the client’s master bus volume to be silent.

  • If you would like to do this through FMOD Studio, connect liveupdate to that specific client, then open the mixer window and drag the master busvolume fader down to -oo dB.
  • If you would instead prefer to add a dedicated debug command in your game’s code, it should call Studio::Bus::setVolume and set the master bus’ volume to 0. I imagine you’ll want a counter-command to set the master bus volume back to normal, as well. Once you’ve created the command, simply call it on the appropriate client to mute that client’s volume.

Sorry for such long absence in this topic, though when I was testing around the liveupdate and such, I’ve got distracted by other issues. I’ve now got it to work to some extend. Im able to update the Master Bus and regulate one of the clients, however for that I have to start the game in the “Standalone Game” method in UE4. Using the Mute Bus Node makes this easier though. I guess the version that is simulated in the editor doesnt have multiple instances of fmod, since there everything gets muted when using the command.

If there is only one instance of FMOD, then in a very real sense there is no such thing as an event instance associated only with a specific player’s client, as in that case (from FMOD’s perspective) there is one one client, and that one client is shared by all the players. This is relatively common in splitscreen multiplayer games. In such cases, 2D events are treated exactly as they would be in a single player game, whereas the audibility, panning, and other 3D behaviors of 3D events are determined in accordance with FMOD’s method of handling multiple listeners.