WaveFormatExtensible http://www.microsoft.com/whdc/device/audio/multichaud.mspx.
More...
|
| WaveFormatExtensible (int rate, int bits, int channels) |
| Creates a new WaveFormatExtensible for PCM or IEEE.
|
|
WaveFormat | ToStandardWaveFormat () |
| Converts the current audio format to a standard WaveFormat.
|
|
override void | Serialize (System.IO.BinaryWriter writer) |
| Serializes the object to a binary writer.
|
|
override string | ToString () |
| Returns a string representing the WAVE_FORMAT_EXTENSIBLE audio format with details of subformat, sample rate, channels, and bits per sample.
|
|
| WaveFormat () |
| Creates a new PCM 44.1Khz stereo 16 bit format.
|
|
| WaveFormat (int sampleRate, int channels) |
| Creates a new 16 bit wave format with the specified sample rate and channel count.
|
|
int | ConvertLatencyToByteSize (int milliseconds) |
| Converts the given latency in milliseconds to the corresponding byte size based on the average bytes per second.
|
|
| WaveFormat (int rate, int bits, int channels) |
| Creates a new PCM format with the specified sample rate, bit depth and channels.
|
|
| WaveFormat (BinaryReader br) |
| Reads a new WaveFormat object from a stream.
|
|
override string | ToString () |
| Returns a string representation of the WaveFormat object.
|
|
override bool | Equals (object obj) |
| Determines whether the current WaveFormat object is equal to another object.
|
|
override int | GetHashCode () |
| Computes the hash code for the WaveFormat instance.
|
|
virtual void | Serialize (BinaryWriter writer) |
| Serializes the wave format data and writes it to the specified BinaryWriter.
|
|
|
Guid | SubFormat [get] |
| SubFormat (may be one of AudioMediaSubtypes)
|
|
WaveFormatEncoding | Encoding [get] |
| Returns the encoding type used.
|
|
int | Channels [get] |
| Returns the number of channels (1=mono,2=stereo etc)
|
|
int | SampleRate [get] |
| Returns the sample rate (samples per second)
|
|
int | AverageBytesPerSecond [get] |
| Returns the average number of bytes used per second.
|
|
virtual int | BlockAlign [get] |
| Returns the block alignment.
|
|
int | BitsPerSample [get] |
| Returns the number of bits per sample (usually 16 or 32, sometimes 24 or 8) Can be 0 for some codecs.
|
|
int | ExtraSize [get] |
| Returns the number of extra bytes used by this waveformat. Often 0, except for compressed formats which store extra data after the WAVEFORMATEX header.
|
|
◆ WaveFormatExtensible() [1/2]
NAudio.Wave.WaveFormatExtensible.WaveFormatExtensible |
( |
| ) |
|
|
inlineprivate |
Parameterless constructor for marshalling.
◆ WaveFormatExtensible() [2/2]
NAudio.Wave.WaveFormatExtensible.WaveFormatExtensible |
( |
int | rate, |
|
|
int | bits, |
|
|
int | channels ) |
|
inline |
Creates a new WaveFormatExtensible for PCM or IEEE.
◆ Serialize()
override void NAudio.Wave.WaveFormatExtensible.Serialize |
( |
System::IO::BinaryWriter | writer | ) |
|
|
inline |
Serializes the object to a binary writer.
- Parameters
-
writer | The binary writer to which the object is serialized. |
- Exceptions
-
System.IO.IOException | An I/O error occurred. |
This method serializes the object to a binary writer by writing the valid bits per sample, channel mask, and subformat as byte array.
◆ ToStandardWaveFormat()
WaveFormat NAudio.Wave.WaveFormatExtensible.ToStandardWaveFormat |
( |
| ) |
|
|
inline |
Converts the current audio format to a standard WaveFormat.
- Returns
- If the subFormat is MEDIASUBTYPE_IEEE_FLOAT and bitsPerSample is 32, returns a new WaveFormat created using the CreateIeeeFloatWaveFormat method with the specified sample rate and channels. If the subFormat is MEDIASUBTYPE_PCM, returns a new WaveFormat with the specified sample rate, bits per sample, and channels. If neither of the above conditions are met, returns the current WaveFormat.
This method checks the subFormat and bitsPerSample to determine the appropriate WaveFormat conversion. If the subFormat is MEDIASUBTYPE_IEEE_FLOAT and bitsPerSample is 32, it creates a new WaveFormat using the CreateIeeeFloatWaveFormat method. If the subFormat is MEDIASUBTYPE_PCM, it creates a new WaveFormat with the specified parameters. If neither of the above conditions are met, it returns the current WaveFormat without modification. If the subFormat is not recognized as PCM or IEEE float, an InvalidOperationException with the message "Not a recognised PCM or IEEE float format" is thrown.
◆ ToString()
override string NAudio.Wave.WaveFormatExtensible.ToString |
( |
| ) |
|
|
inline |
Returns a string representing the WAVE_FORMAT_EXTENSIBLE audio format with details of subformat, sample rate, channels, and bits per sample.
- Returns
- A string representing the WAVE_FORMAT_EXTENSIBLE audio format with details of subformat, sample rate, channels, and bits per sample.
◆ dwChannelMask
int NAudio.Wave.WaveFormatExtensible.dwChannelMask |
|
private |
◆ subFormat
Guid NAudio.Wave.WaveFormatExtensible.subFormat |
|
private |
◆ wValidBitsPerSample
short NAudio.Wave.WaveFormatExtensible.wValidBitsPerSample |
|
private |
◆ SubFormat
Guid NAudio.Wave.WaveFormatExtensible.SubFormat |
|
get |
SubFormat (may be one of AudioMediaSubtypes)
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Wave/WaveFormats/WaveFormatExtensible.cs