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.

c#
public sealed class WavHeader : Header

View source

Constructors ​

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

Properties ​

NameDescription
AudioFormatGets or sets the audio format code. Always 1 (PCM) for files this library can read and write.
BitsPerSampleGets or sets the number of bits per sample. Always 8 for files this library can read and write.
BlockAlignGets or sets the block align: NumChannels * BitsPerSample / 8.
ByteRateGets or sets the byte rate: SampleRate * NumChannels * BitsPerSample / 8.
DataSizeGets or sets the length of the sample data in bytes.
NumChannelsGets or sets the number of channels. Always 1 (mono) for files this library can read and write.
SampleRateGets or sets the sample rate of the audio in Hz.