docs/doc/reference/com/google/android/exoplayer2/audio/MpegAudioUtil.html
Package com.google.android.exoplayer2.audio
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classMpegAudioUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Utility methods for handling MPEG audio streams.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | MpegAudioUtil.Header |
Deprecated.
Stores the metadata for an MPEG audio frame. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | MAX_FRAME_SIZE_BYTES |
Deprecated.
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).
|
| static int | MAX_RATE_BYTES_PER_SECOND |
Deprecated.
Maximum rate for an MPEG audio stream corresponding to MPEG-1 layer III (320 kbit/s), in bytes per second. |
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static int | getFrameSize(int headerData) |
Deprecated.
Returns the size of the frame associated with header, or C.LENGTH_UNSET if it is invalid.
|
| static int | parseMpegAudioFrameSampleCount(int headerData) |
Deprecated.
Returns the number of samples per frame associated with headerData, or C.LENGTH_UNSET if it is invalid.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int MAX_FRAME_SIZE_BYTES
Deprecated.
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). The size is 1152 sample/frame * 160000 bit/s / (8000 sample/s * 8 bit/byte) + 1 padding byte/frame = 2881 byte/frame. The next power of two size is 4 KiB. See Also:Constant Field Values
-
public static final int MAX_RATE_BYTES_PER_SECOND
Deprecated.
Maximum rate for an MPEG audio stream corresponding to MPEG-1 layer III (320 kbit/s), in bytes per second. See Also:Constant Field Values
-
public static int getFrameSize(int headerData)
Deprecated.
Returns the size of the frame associated with header, or C.LENGTH_UNSET if it is invalid.
-
public static int parseMpegAudioFrameSampleCount(int headerData)
Deprecated.
Returns the number of samples per frame associated with headerData, or C.LENGTH_UNSET if it is invalid.