Skip to main content

VU meter

The VU meter block processes the audio stream and provides data for the UI element.

Block info

Name: VUMeterBlock.

Pin directionMedia typePins count
InputUncompressed audio1
OutputUncompressed audio1

The sample pipeline

Sample code

var pipeline = new MediaBlocksPipeline();

var filename = "test.mp3";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var vumeter = new VUMeterBlock();
vumeter.OnAudioVUMeter += VUMeter_OnAudioVUMeter;
pipeline.Connect(fileSource.AudioOutput, vumeter.Input);

var audioRenderer = new AudioRendererBlock();
pipeline.Connect(vumeter.Output, audioRenderer.Input);

await pipeline.StartAsync();

private void VUMeter_OnAudioVUMeter(object sender, VisioForge.Core.Types.X.VUMeterXEventArgs e)
{

}

Platforms

Windows, macOS, Linux, iOS, Android.