Split Screen: Panning specific listeners

(Logan Hardin) #1

Howdy all,

I’m working in FMOD on a two-player split-screen competitive game in Unity. In our first builds thus far we’ve simply played most of the sounds as simply 2D events, or otherwise superimposed on each other; I feel like this will get too cluttered down the line. I know there are a variety of methods for going about this, but specifically I’m looking into panning separate audio listeners, one for each player, to the left and right on playback. This ideally would apply to 3D sounds and some player-specific 2D sounds, but would also allow some 2D sounds to play equally for both players.

Where should I start? I’m sure the API documentation has good information but I’m a little lost.

(リチャード清水) #2

Hi Logan,

Unfortunately it is not currently possible to map listeners to certain speakers. The only way to achieve this would be to create a custom-made spatializer DSP to allow this.

You might want to take a look into ListenerMasks to assign certain events to certain listeners.



(Logan Hardin) #3

Hi Richard,

Thank you for your response. I wasn’t quite clear on what I meant; rather than sending individual listeners to their own specific speakers, I meant more that I would like to adjust the panning of the sounds played and heard through that listener. I feel like there should be some way to get that kind of effect with these Listener Masks…would it be possible to pan each event played based on the Listener Mask through which it is played, or perhaps based on their proximity to each character?

Thank you,

(リチャード清水) #4

Hi Logan,

There would be two ways of doing this: one would be to create a parameter on all events you wish to pan and assign automated panning to these parameters. When the event is created with a ListenerMask in mind, you can also pass in parameter values to tell it to pan left/right.

Another method is to use FMOD::ChannelGroups and setPan() those channel groups left/right. Remember to use flushCommands() to ensure the event instance is create first before trying to use ChannelGroups.