# WAV output

Media Blocks SDK .Net

WAV (Waveform Audio File Format): Developed by IBM and Microsoft, this audio file format is a standard for storing an audio bitstream on PCs. It is uncompressed and thus retains high quality, making it ideal for professional audio recording and editing.

Use the constructor to specify the file name.

# Block info

Name: WAVSinkBlock.

Pin direction Media type Pins count
Input audio PCM [S32LE, S24LE, S16LE, U8] one or more
IEEE [F32LE, F64LE]
audio/x-mulaw
audio/x-alaw

# The sample pipeline

graph LR;
    VirtualAudioSourceBlock-->WAVSinkBlock;

# Sample code

The following code snippet shows how to create a pipeline with a WAV sink block.

var pipeline = new MediaBlocksPipeline();

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

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

await pipeline.StartAsync();

# Platforms

Windows, macOS, Linux, iOS, Android.