Table of Contents

Class Mp3Frame

Namespace
NAudio.Wave
Assembly
NAudio.Core.dll

Represents an MP3 Frame

public class Mp3Frame
Inheritance
Mp3Frame
Inherited Members

Properties

BitRate

Bit Rate

public int BitRate { get; }

Property Value

int

BitRateIndex

The bitrate index (directly from the header)

public int BitRateIndex { get; }

Property Value

int

ChannelExtension

The channel extension bits

public int ChannelExtension { get; }

Property Value

int

ChannelMode

Channel Mode

public ChannelMode ChannelMode { get; }

Property Value

ChannelMode

Whether the Copyright bit is set

public bool Copyright { get; }

Property Value

bool

CrcPresent

Whether a CRC is present

public bool CrcPresent { get; }

Property Value

bool

FileOffset

Not part of the MP3 frame itself - indicates where in the stream we found this header

public long FileOffset { get; }

Property Value

long

FrameLength

Frame length in bytes

public int FrameLength { get; }

Property Value

int

MpegLayer

MPEG Layer

public MpegLayer MpegLayer { get; }

Property Value

MpegLayer

MpegVersion

MPEG Version

public MpegVersion MpegVersion { get; }

Property Value

MpegVersion

RawData

Raw frame data (includes header bytes)

public byte[] RawData { get; }

Property Value

byte[]

SampleCount

The number of samples in this frame

public int SampleCount { get; }

Property Value

int

SampleRate

Sample rate of this frame

public int SampleRate { get; }

Property Value

int

Methods

LoadFromStream(Stream)

Reads an MP3 frame from a stream

public static Mp3Frame LoadFromStream(Stream input)

Parameters

input Stream

input stream

Returns

Mp3Frame

A valid MP3 frame, or null if none found

LoadFromStream(Stream, bool)

Reads an MP3Frame from a stream

public static Mp3Frame LoadFromStream(Stream input, bool readData)

Parameters

input Stream
readData bool

Returns

Mp3Frame

A valid MP3 frame, or null if none found

Remarks