I’m using the metering info of my dialogue as values in the animation of my characters. The problem I have is that I want the user to be able to mute the dialogue if they want and still get this animation, but if I turn the sound down I don’t get the output levels. I’ve tried setting up the dialogue on a bus that then routes to a second bus like this.
In the mixer it is showing the output levels of the Higgs bus even though the Dialogue bus is turned down and I can’t hear the sound. I’ve tried getting that info like this.
FMOD.Studio.Bus playerBus = FMODUnity.RuntimeManager.GetBus("bus:/Dialogue/Higgs");
FMOD.ChannelGroup playerGroup;
playerBus.getChannelGroup(out playerGroup);
FMOD.DSP playerdsp;
playerGroup.getDSP(0, out playerdsp);
playerdsp.setMeteringEnabled(true, true);
FMOD.DSP_METERING_INFO playerLevel;
playerdsp.getMeteringInfo(new IntPtr(), out playerLevel);
float playerOutput = playerLevel.peaklevel[0] + playerLevel.peaklevel[1];
Player.talkAmount = playerOutput * 3;
It works fine with the Dialogue bus turned up, but I get nothing when it’s tuned down. I would assume that when I use getMeteringInfo I need the input not the output (since that’s the one that shows data on the mixer), but when I do that like this
playerdsp.getMeteringInfo(out playerLevel, new IntPtr());
I get nothing even when the sound is turned up.
Can anyone please help me with this. Am I even in the right area. Is there any way at all I can achieve this?