Table of Contents

Struct WavInfo

Namespace
Sigil.Sound.Wav
Assembly
Sigil.Sound.dll

What a WAV file says about itself, read without decoding the audio. See Sigil.Sound.Wav.WavReader.ReadInfo(System.ReadOnlySpan{System.Byte}).

public readonly struct WavInfo

Inherited Members

Constructors

WavInfo(int, int, int, bool, int)

Describes a WAV file's format and length.

public WavInfo(int channels, int sampleRate, int bitsPerSample, bool isFloat, int frameCount)

Parameters

channels int

1 for mono, 2 for stereo.

sampleRate int

Frames per second.

bitsPerSample int

8, 16, 24 or 32.

isFloat bool

True for 32-bit floating point samples, false for integer PCM.

frameCount int

How many frames (one sample per channel) the file holds.

Properties

BitsPerSample

The size of one sample: 8, 16, 24 or 32 bits.

public int BitsPerSample { get; }

Property Value

int

Channels

1 for mono, 2 for stereo.

public int Channels { get; }

Property Value

int

Duration

The length of the audio in seconds at the file's own sample rate.

public double Duration { get; }

Property Value

double

FrameCount

How many frames the file holds; a frame has one sample per channel.

public int FrameCount { get; }

Property Value

int

IsFloat

True when samples are 32-bit floating point, false when they are integer PCM.

public bool IsFloat { get; }

Property Value

bool

SampleRate

Frames per second, as the file declares it.

public int SampleRate { get; }

Property Value

int