Class WaveFormat
Represents a Wave file format.
Namespace: System.Dynamic.ExpandoObject
Assembly: ManagedBass.dll
Syntax
public class WaveFormat : object
Constructors
WaveFormat()
Creates a new PCM 44.1Khz stereo 16 bit format
Declaration
public WaveFormat()
WaveFormat(Int32, Int32)
Creates a new 16 bit wave format with the specified sample rate and channel count
Declaration
public WaveFormat(int SampleRate, int Channels)
Parameters
Int32
SampleRate
Sample Rate |
Int32
Channels
Number of channels |
WaveFormat(Int32, Int32, Int32)
Creates a new PCM format with the specified sample rate, bit depth and channels
Declaration
public WaveFormat(int SampleRate, int BitsPerSample, int Channels)
Parameters
Int32
SampleRate
|
Int32
BitsPerSample
|
Int32
Channels
|
Properties
AverageBytesPerSecond
Gets or Sets the average number of bytes used per second
Declaration
public int AverageBytesPerSecond { get; set; }
Property Value
Int32
|
BitsPerSample
Gets or Sets the number of bits per sample (usually 16 or 32, sometimes 24 or 8) Can be 0 for some codecs
Declaration
public int BitsPerSample { get; set; }
Property Value
Int32
|
BlockAlign
Gets or Sets the block alignment
Declaration
public int BlockAlign { get; set; }
Property Value
Int32
|
Channels
Gets or Sets the number of channels (1=mono,2=stereo etc)
Declaration
public int Channels { get; set; }
Property Value
Int32
|
Encoding
Gets or Sets the encoding Type used
Declaration
public WaveFormatTag Encoding { get; set; }
Property Value
WaveFormatTag
|
ExtraSize
Gets or Sets the number of extra bytes used by this waveformat. Often 0, except for compressed formats which store extra data after the WAVEFORMATEX header
Declaration
public int ExtraSize { get; set; }
Property Value
Int32
|
SampleRate
Gets or Sets the sample rate (samples per second)
Declaration
public int SampleRate { get; set; }
Property Value
Int32
|
Methods
CreateIeeeFloat(Int32, Int32)
Creates a new 32 bit IEEE floating point wave format
Declaration
public static WaveFormat CreateIeeeFloat(int SampleRate, int Channels)
Parameters
Int32
SampleRate
sample rate |
Int32
Channels
number of channels |
Returns
WaveFormat
|
FromChannel(Int32)
Creates a new instance of WaveFormat from a Channel
.
Declaration
public static WaveFormat FromChannel(int Channel)
Parameters
Int32
Channel
|
Returns
WaveFormat
|
Serialize(BinaryWriter)
Writes this WaveFormat object to a stream
Declaration
public virtual void Serialize(BinaryWriter Writer)
Parameters
BinaryWriter
Writer
the output stream |