public final class GaplessInfoHolder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
encoderDelay
The number of samples to trim from the start of the decoded audio stream, or
Format.NO_VALUE if not set. |
int |
encoderPadding
The number of samples to trim from the end of the decoded audio stream, or
Format.NO_VALUE if not set. |
static Id3Decoder.FramePredicate |
GAPLESS_INFO_ID3_FRAME_PREDICATE
A
Id3Decoder.FramePredicate suitable for use when decoding Metadata that will be passed
to setFromMetadata(Metadata). |
| Constructor and Description |
|---|
GaplessInfoHolder()
Creates a new holder for gapless playback information.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasGaplessInfo()
Returns whether
encoderDelay and encoderPadding have been set. |
boolean |
setFromMetadata(Metadata metadata)
Populates the holder with data parsed from ID3
Metadata. |
boolean |
setFromXingHeaderValue(int value)
Populates the holder with data from an MP3 Xing header, if valid and non-zero.
|
public static final Id3Decoder.FramePredicate GAPLESS_INFO_ID3_FRAME_PREDICATE
Id3Decoder.FramePredicate suitable for use when decoding Metadata that will be passed
to setFromMetadata(Metadata). Only frames that might contain gapless playback
information are decoded.public int encoderDelay
Format.NO_VALUE if not set.public int encoderPadding
Format.NO_VALUE if not set.public GaplessInfoHolder()
public boolean setFromXingHeaderValue(int value)
value - The 24-bit value to decode.public boolean setFromMetadata(Metadata metadata)
Metadata.metadata - The metadata from which to parse the gapless information.public boolean hasGaplessInfo()
encoderDelay and encoderPadding have been set.