public final class MpegAudioHeader extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
bitrate
Bitrate of the frame in bit/s.
|
int |
channels
Number of audio channels in the frame.
|
int |
frameSize
Size of the frame associated with this header, in bytes.
|
static int |
MAX_FRAME_SIZE_BYTES
Theoretical maximum frame size for an MPEG audio stream, which occurs when playing a Layer 2
MPEG 2.5 audio stream at 16 kb/s (with padding).
|
String |
mimeType
The mime type.
|
int |
sampleRate
Sample rate in samples per second.
|
int |
samplesPerFrame
Number of samples stored in the frame.
|
int |
version
MPEG audio header version.
|
| Constructor and Description |
|---|
MpegAudioHeader() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getFrameSize(int header)
Returns the size of the frame associated with
header, or -1 if it is invalid. |
static boolean |
populateHeader(int headerData,
MpegAudioHeader header)
Parses
headerData, populating header with the parsed data. |
public static final int MAX_FRAME_SIZE_BYTES
public int version
public String mimeType
public int frameSize
public int sampleRate
public int channels
public int bitrate
public int samplesPerFrame
public static int getFrameSize(int header)
header, or -1 if it is invalid.public static boolean populateHeader(int headerData,
MpegAudioHeader header)
headerData, populating header with the parsed data.headerData - Header data to parse.header - Header to populate with data from headerData.headerData
is not a valid MPEG audio header.