Skip to main content

Audio rendering

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 directionMedia typePins count
Input audiouncompressed audio1

Enumerate available devices

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

The sample pipeline

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.