Skip to main content

AAC encoder

ADPCM encoder is used for encoding an audio stream in ADPCM format.

Block info

Name: ADPCMEncoderBlock.

Pin directionMedia typePins count
InputPCM1
Outputaudio/x-adpcm1

The sample pipeline

UniversalSourceBlock ADPCMEncoderBlock WAVSinks

Sample code

var pipeline = new MediaBlocksPipeline(false);

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

var adpcmEncoderBlock = new ADPCMEncoderBlock();

pipeline.Connect(fileSource.AudioOutput, adpcmEncoderBlock.Input);

var wavSinkBlock = new WAVSinkBlock(@"output.wav");
pipeline.Connect(adpcmEncoderBlock.Output, wavSinkBlock.Input);

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.