Represents a Xing VBR header.
More...
|
void | WriteBigEndian (byte[] buffer, int offset, int value) |
| Writes the integer value in big-endian format to the specified buffer at the given offset.
|
|
| XingHeader () |
| Sees if a frame contains a Xing header.
|
|
|
static int | ReadBigEndian (byte[] buffer, int offset) |
| Reads a 32-bit integer from the specified buffer in big-endian format.
|
|
|
static int[] | sr_table = { 44100, 48000, 32000, 99999 } |
|
Represents a Xing VBR header.
◆ XingHeaderOptions
Enumerator |
---|
Frames | |
Bytes | |
Toc | |
VbrScale | |
◆ XingHeader()
NAudio.Wave.XingHeader.XingHeader |
( |
| ) |
|
|
inlineprivate |
Sees if a frame contains a Xing header.
◆ LoadXingHeader()
Loads the Xing header from the provided Mp3Frame.
- Parameters
-
frame | The Mp3Frame from which to load the Xing header. |
- Returns
- The XingHeader loaded from the Mp3Frame, or null if the MPEG version is unsupported or the Xing header is not found.
This method loads the Xing header from the provided Mp3Frame. It calculates the offset based on the MPEG version and channel mode of the frame, and then checks for the presence of the Xing or Info header. If the Xing or Info header is found, it reads the XingHeaderOptions flags and sets the corresponding properties in the XingHeader object. The method returns the loaded XingHeader or null if the MPEG version is unsupported or the Xing header is not found.
- Exceptions
-
FormatException | Thrown when the MPEG version is unsupported. |
◆ ReadBigEndian()
static int NAudio.Wave.XingHeader.ReadBigEndian |
( |
byte[] | buffer, |
|
|
int | offset ) |
|
inlinestaticprivate |
Reads a 32-bit integer from the specified buffer in big-endian format.
- Parameters
-
buffer | The input buffer containing the integer data. |
offset | The offset at which the integer data starts in the buffer. |
- Returns
- The 32-bit integer read from the buffer in big-endian format.
◆ WriteBigEndian()
void NAudio.Wave.XingHeader.WriteBigEndian |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | value ) |
|
inlineprivate |
Writes the integer value in big-endian format to the specified buffer at the given offset.
- Parameters
-
buffer | The buffer to write the big-endian value to. |
offset | The offset within the buffer at which to start writing the value. |
value | The integer value to be written in big-endian format. |
This method converts the integer value into its little-endian byte representation using the BitConverter.GetBytes method. It then writes the bytes in reverse order to the buffer starting from the specified offset to ensure big-endian format.
◆ bytesOffset
int NAudio.Wave.XingHeader.bytesOffset = -1 |
|
private |
◆ endOffset
int NAudio.Wave.XingHeader.endOffset |
|
private |
◆ frame
◆ framesOffset
int NAudio.Wave.XingHeader.framesOffset = -1 |
|
private |
◆ sr_table
int [] NAudio.Wave.XingHeader.sr_table = { 44100, 48000, 32000, 99999 } |
|
staticprivate |
◆ startOffset
int NAudio.Wave.XingHeader.startOffset |
|
private |
◆ tocOffset
int NAudio.Wave.XingHeader.tocOffset = -1 |
|
private |
◆ vbrScale
int NAudio.Wave.XingHeader.vbrScale = -1 |
|
private |
◆ Bytes
int NAudio.Wave.XingHeader.Bytes |
|
getset |
◆ Frames
int NAudio.Wave.XingHeader.Frames |
|
getset |
◆ Mp3Frame
Mp3Frame NAudio.Wave.XingHeader.Mp3Frame |
|
get |
◆ VbrScale
int NAudio.Wave.XingHeader.VbrScale |
|
get |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/FileFormats/Mp3/XingHeader.cs