Multiple listeners for a multiplayer asymmetric Desktop / VR game

Hi!
In this project both the VR and desktop player are in the same scene and I would like some sounds to be heard only by the VR player, other sounds only by the desktop player and probably some sounds that both players are able to hear. Is it possible to assign different sounds to two different FMOD Studio Listeners? Any help would be appreciated!

There is a way to do what you want - but listeners are not the right tool for it. See, despite the name, a listener never actually receives or processes any audio. Rather, it’s just the set of coordinates used by events to calculate their built-in parameter values and the panning and attenuation that should be applied by their spatializing effects.

Instead, the way to ensure your VR and desktop players hear different events depends on whether they are using the same machine or two different machines.

If your VR and desktop players are both using the same machine, you want port buses. Port buses exist alongside the project master bus, and each port bus routes its output to a different audio device than a platform’s default speakers. You can create a port bus by right-clicking in the routing browser and selecting “New Port”; you’ll then want to set the port bus’ port type to the appropriate port bus type for the device in question. You can read more about port buses in our documentation on the topic.

If your VR and desktop players are actually using two different computers to play over a network, they’re actually each actually playing a separate copy of your game; it’s just that those instances of the game are communicating with each other over the network. Each of these instances of your game has its own game state, its own instance of the FMOD Engine, and its own list of playing events. That being the case, determining which events are audible to which player is just a matter of ensuring each player’s instance of your game only plays the events that that player is supposed to hear.