Skip to main content

Speex encoder

WAV encoder block can produce a PCM stream with a specified format.

Use WAVEncoderSettings class to set the parameters.

Block info

Name: WAVEncoderBlock.

Pin directionMedia typePins count
InputPCM1
OutputPCM1

The sample pipeline

FileSourceBlock WAVEncoderBlock WAVSinkBlock

Sample code

var pipeline = new MediaBlocksPipeline(false);

var fileSource = new FileSourceBlock();
fileSource.Filename = "test.mp3";

var wavEncoderBlock = new WAVEncoderBlock(new WAVEncoderSettings());
pipeline.Connect(fileSource.Output, wavEncoderBlock.Input);

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

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.