Skip to main content

Balance

The Balance block sets the position in the stereo panorama.

Use the balance value to configure.

Block info

Name: AudioBalanceBlock.

Pin directionMedia typePins count
InputUncompressed audio1
OutputUncompressed audio1

The sample pipeline

Sample code

var pipeline = new MediaBlocksPipeline(false);

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

var balance = new AudioBalanceBlock(1.0f);
pipeline.Connect(fileSource.AudioOutput, balance.Input);

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

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.