# Audio rendering

Media Blocks SDK .Net

# AudioRendererBlock

The Audio Renderer block is used to play the audio stream on the selected or default device. Volume and mute options are available.

Depending on the platform, the block uses the following audio renderers:

  • Windows: DirectSound, WASAPI, ASIO
  • macOS: CoreAudio
  • Linux: ALSA
  • iOS: CoreAudio
  • Android: OpenSL ES

# Block info

Name: AudioRendererBlock.

Pin direction Media type Pins count
Input audio uncompressed audio 1

# Enumerate available devices

Use the AudioRendererBlock.GetDevices method to get a list of available devices.

# The sample pipeline

graph LR;
    SystemAudioSourceBlock-->AudioRendererBlock;

# Sample code

var pipeline = new MediaBlocksPipeline();

var audioSourceBlock = new VirtualAudioSourceBlock(new VirtualAudioSourceSettings());

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

await pipeline.StartAsync();

# Platforms

Windows, macOS, Linux, iOS, Android.