Table of Contents

Class VUMeterXData

Namespace
VisioForge.Core.Types.X
Assembly
VisioForge.Core.dll

Represents a snapshot of VU (Volume Unit) meter data for multiple audio channels. This class provides information about peak, decay, and RMS (Root Mean Square) levels.

public class VUMeterXData

Inheritance

Inherited Members

Examples

// Assume 'vuData' is an instance of VUMeterXData obtained from an audio processing component.
// VUMeterXData vuData = audioProcessor.GetVUMeterData();

if (vuData != null)
{
    Console.WriteLine($"VU Meter Data for {vuData.ChannelsCount} channels:");
    for (int i = 0; i < vuData.ChannelsCount; i++)
    {
        Console.WriteLine($"  Channel {i + 1}: Peak={vuData.Peak[i]:F2}, Decay={vuData.Decay[i]:F2}, RMS={vuData.RMS[i]:F2}");
    }

    // True-peak (dBTP) is computed per ITU-R BS.1770-4 Annex 2 and may be null
    // if true-peak computation is not active for the current pipeline.
    if (vuData.TruePeak != null)
    {
        for (int i = 0; i < vuData.TruePeak.Length; i++)
        {
            Console.WriteLine($"  Channel {i + 1}: TruePeak={vuData.TruePeak[i]:F2} dBTP");
        }
    }

    // You can use this data to draw a custom VU meter UI.
}

Remarks

VU meter data is typically used for visualizing audio levels in real-time, helping users monitor audio input or output. The arrays for VisioForge.Core.Types.X.VUMeterXData.Peak, VisioForge.Core.Types.X.VUMeterXData.Decay, and VisioForge.Core.Types.X.VUMeterXData.RMS will have a size equal to VisioForge.Core.Types.X.VUMeterXData.ChannelsCount.

Properties

ChannelsCount

Gets or sets the number of audio channels for which VU meter data is available.

public int ChannelsCount { get; set; }

Property Value

int

Decay

Gets or sets an array of decay audio levels for each channel. Decay represents the gradual decrease in audio level after a peak.

public double[] Decay { get; set; }

Property Value

double[]

Peak

Gets or sets an array of peak audio levels for each channel. The values are typically normalized (e.g., 0.0 to 1.0 or -dB to 0 dB).

public double[] Peak { get; set; }

Property Value

double[]

RMS

Gets or sets an array of RMS (Root Mean Square) audio levels for each channel. RMS provides a measure of the average power of the audio signal.

public double[] RMS { get; set; }

Property Value

double[]

TruePeak

Gets or sets an array of true-peak (dBTP) audio levels for each channel, computed per ITU-R BS.1770-4 Annex 2 using 4x polyphase oversampling.

public double[] TruePeak { get; set; }

Property Value

double[]

Remarks

True peak captures inter-sample peaks that VisioForge.Core.Types.X.VUMeterXData.Peak (sample peak) misses but that appear at the DAC output or after lossy encoding, so it is the correct value to test against broadcast clip thresholds (e.g. -1 dBTP). Values are in dB and are floored at a low sentinel (~-120 dB) for silence; values are NOT capped at 0 dBTP — inter-sample peaks of already-clipped material can exceed full-scale and produce positive dBTP readings, which is the correct behaviour per ITU-R BS.1770-4 (a value above 0 dBTP is the diagnostic that the source is clipped). Length equals VisioForge.Core.Types.X.VUMeterXData.ChannelsCount. May be null if true-peak computation is not active for the current pipeline.