The M_AV_PROPS structure contains an ancData field, that is a M_ANC_DATA structure with input and output audio loudness information (audOriginal and audOutput fields). The M_AUDIO_LOUDNESS structure contains lufs field of LUFS_METERS type where the data is stored.

Make audio meters

By getting the audio loudness information using a timer or for each processed frame, you can build audio meters of different types (RMS, VU, LUFS meters).

In MFormats, you can use LUFS data to implement an audio normalization algorithm. In MPlatform, there is internal audio normalization option.

Enable LUFS measurement

LUFS meters are disabled by default. A calculation increases a time to process each frame to 2ms. If the feature is not necessary for your project or you need better performance in frame processing (e.g. for 60 fps or higher each millisecond is important), it is better to keep it disabled. To enable LUFS measurement, you should set "audio.lufs" property to "true" using the PropsSet method.

It works for all source objects in MPlatform (MFile, MPlaylist, MLive - use "object::audio.lufs" property) and MFormats (MFReader, MFLive - just "audio.lufs").