# Loudness meter Unreal 4 Integration?

**URL:** <https://qa.fmod.com/t/loudness-meter-unreal-4-integration/14467>\
**Category:** Unreal Engine\
**Created:** [March 21, 2019, 4:10pm UTC](https://qa.fmod.com/t/loudness-meter-unreal-4-integration/14467 "2019-03-21T16:10:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [March 28, 2019, 3:58am UTC](https://qa.fmod.com/t/loudness-meter-unreal-4-integration/14467/3 "2019-03-28T03:58:14Z")

</div>

You could use the [FMOD\_DSP\_METERING\_INFO](https://fmod.com/resources/documentation-api?version=2.0&page=plugin-api-dsp.html#fmod_dsp_metering_info) to get the levels for each channel.

We do a similar thing in the Unity integration for the debug window.

Here is a sudo code example of what you could do:

```auto
startup
{
    system->getMasterChannelGroup(master)
    master->getDSP(FMOD.CHANNELCONTROL_DSP_INDEX.HEAD, mixerHead)
    mixerHead->setMeteringEnabled(false, true)
}

game loop
{
    mixerHead.getMeteringInfo(0, outputMetering)
    
    for each (i = outputMetering.numchannels)
    {
        value = outputMetering.rmsLevel[i] * outputMetering.rmsLevel[i]
        // Each channel represents a speaker.
        // Here it is up to you what you do with this information.
        // In Unity we combine all the values to give one overall value.
        // 
    }

    float db = value > 0 ? 20.0f * Log10(value * Sqrt(2.0f)) : -80.0f;
    if (db > 10.0f) db = 10.0f;
}

```

[https://fmod.com/resources/documentation-api?version=2.0&page=core-api-dsp.html#dsp\_getmeteringinfo](https://fmod.com/resources/documentation-api?version=2.0&page=core-api-dsp.html#dsp_getmeteringinfo)

---

_[View the full topic](https://qa.fmod.com/t/loudness-meter-unreal-4-integration/14467)._
