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 WavInfoInherited 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
channelsint-
1 for mono, 2 for stereo.
sampleRateint-
Frames per second.
bitsPerSampleint-
8, 16, 24 or 32.
isFloatbool-
True for 32-bit floating point samples, false for integer PCM.
frameCountint-
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
Channels
1 for mono, 2 for stereo.
public int Channels { get; }Property Value
Duration
The length of the audio in seconds at the file's own sample rate.
public double Duration { get; }Property Value
FrameCount
How many frames the file holds; a frame has one sample per channel.
public int FrameCount { get; }Property Value
IsFloat
True when samples are 32-bit floating point, false when they are integer PCM.
public bool IsFloat { get; }Property Value
SampleRate
Frames per second, as the file declares it.
public int SampleRate { get; }