VU meter
The VU meter block processes the audio stream and provides data for the UI element.
Block info
Name: VUMeterBlock.
Pin direction | Media type | Pins count |
---|---|---|
Input | Uncompressed audio | 1 |
Output | Uncompressed audio | 1 |
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.