Table of Contents

Class VUMeterEventArgs

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

Provides data for events that report VU (Volume Unit) meter levels for audio visualization and monitoring.

public class VUMeterEventArgs : EventArgs

Inheritance

Inherited Members

Examples

// Subscribe to VU meter events
mediaPlayer.OnVUMeterData += (sender, e) =>
{
    // Process stereo audio levels
    if (e.MeterData.Length >= 2)
    {
        int leftChannel = e.MeterData[0];
        int rightChannel = e.MeterData[1];

        // Update UI level meters
        UpdateLevelMeter(leftChannel, rightChannel);
    }
};

Remarks

This event argument is used in audio processing pipelines to report real-time volume levels for each audio channel. The VU meter data is typically used to create visual representations of audio intensity, such as level meters, peak indicators, or other audio visualization components in media players and audio processing applications.

Each value in the VisioForge.Core.Types.VUMeterEventArgs.MeterData array represents the current volume level for a specific audio channel. For stereo audio, index 0 typically represents the left channel and index 1 represents the right channel. Multi-channel audio (e.g., 5.1, 7.1) will have corresponding indices for each channel.

The values are typically normalized to a specific range (e.g., 0-100 or 0-255) depending on the implementation, where 0 represents silence and the maximum value represents the loudest possible signal before clipping.

Constructors

VUMeterEventArgs(int[])

Initializes a new instance of the VisioForge.Core.Types.VUMeterEventArgs class with the specified VU meter data.

public VUMeterEventArgs(int[] meterData)

Parameters

meterData int[]

An array of integer values representing the VU meter levels for each audio channel. Must not be null. The array should contain one value per audio channel.

Exceptions

ArgumentNullException

Thrown when meterData is null.

Properties

MeterData

Gets an array of integer values representing the current VU meter levels for each audio channel.

public int[] MeterData { get; }

Property Value

int[]

Remarks

The interpretation of values depends on the specific implementation: - For percentage-based systems: 0-100 where 100 represents 0 dBFS - For byte-based systems: 0-255 where 255 represents 0 dBFS - Negative dB values may be mapped to the positive integer range

See Also