Answered
0
0

Hello,

I hope someone can help me out – I’m looking for the simplest way of getting the output of an FMOD event – by that I mean the actual level on the master of the event – at any given moment. RMS, or actual sample by sample, or whatever – anything will do!

I know that a few questions like this have been asked already but the answers are either super complicated or refer to the first version of the Unity integration. I’m on the latest one. There also seem to be a lot of steps (from channel groups, to DSP, to setting the metering etc), and I’m wondering whether I’m missing a simpler way. Either way, I can’t get it to work.

I’m working in Unity 5 and scripting in C#. Integration version 1.07.04.

  • You must to post comments
Best Answer
0
0

The code to enable metering and get the RMS is independent of which Unity Integration you use.

Digging into the DSP graph in the correct way to get RMS. Can you elaborate on what isn’t working, and what you’ve tried to do to fix it.

  • Nicholas Wilcox

    Add
    Outputmeter = new FMOD.DSP_METERING_INFO();
    to your Start method. And Outputmeter.rmslevel[1] is the level for the right channel and will only be a valid number for stereo or greater channels. Use Outputmeter.rmslevel[0] for mono channels, or better still use Outputmeter.numchannels to find out how many channels there are.

    • Guest
    • 1 year ago

    thanks! but i hv a same problem here: this.flickerAudioEvent.getChannelGroup(out this.channelGroup); keeps throwing error of null argument exception. any ideas?

  • Nicholas Wilcox

    See the documentation for EventInstance.getChannelGroup about when it returns null http://www.fmod.org/documentation/#content/generated/FMOD_Studio_EventInstance_GetChannelGroup.html

  • Enrico

    Did you find a fix to this? I am trying to have the same result and this is the only post available (even though is still not solved)

  • Andrew Scott

    Hi Enrico, can you start a new post and explain your situation in more detail please? Thanks.

Showing 1 result
Your Answer

Please first to submit.