Well, so far I have this…
FMOD.Studio.EventInstance instance = e.Instance; // I made a public getter for instance
if (instance != null)
FMOD.ChannelGroup group; instance.getChannelGroup(out group);
if (group != null)
group.getDSP(0, out dsp);
dsp.getChannelFormat(out channelmask, out dspchannels, out dspspeakermode);
dspchannels now tells me whether I’m dealing with a mono, stereo or multi-channel event.
This seems a bit convoluted… and I have no idea if it is robust to all situations. Any one have a better suggestion?
A bigger problem, however, is that Event must be playing for it to work.
I’m writing code for setting the setMixMatrix from Unity, and I wold like the Unity Inspector to show the correct number of in/out channels BEFORE I press play.
It would seem to me that I should be able to get the number of channels from the Event before it is playing… from the FMOD.Studio.EventDescription would be ideal, but I don’t see how.
Any tips greatly appreciated!