Skip to content

WavHeader Class

Definition

The 44-byte canonical header of a mono, 8-bit PCM WAV file: the RIFF/WAVE chunk plus the fmt and data subchunk headers.

public sealed class WavHeader : Header

View source

Constructors

Name Description
WavHeader(UInt32, Int32) Initializes a new instance of the WavHeader class for the given sample rate and sample data length.

Properties

Name Description
AudioFormat Gets or sets the audio format code. Always 1 (PCM) for files this library can read and write.
BitsPerSample Gets or sets the number of bits per sample. Always 8 for files this library can read and write.
BlockAlign Gets or sets the block align: NumChannels * BitsPerSample / 8.
ByteRate Gets or sets the byte rate: SampleRate * NumChannels * BitsPerSample / 8.
DataSize Gets or sets the length of the sample data in bytes.
NumChannels Gets or sets the number of channels. Always 1 (mono) for files this library can read and write.
SampleRate Gets or sets the sample rate of the audio in Hz.