GaplessInfoHolder


@UnstableApi
public final class GaplessInfoHolder


Holder for gapless playback information.

Summary

Public fields

int

The number of samples to trim from the start of the decoded audio stream, or NO_VALUE if not set.

int

The number of samples to trim from the end of the decoded audio stream, or NO_VALUE if not set.

Public constructors

Creates a new holder for gapless playback information.

Public methods

boolean

Returns whether encoderDelay and encoderPadding have been set.

boolean

Populates the holder with data parsed from ID3 Metadata.

Public fields

encoderDelay

public int encoderDelay

The number of samples to trim from the start of the decoded audio stream, or NO_VALUE if not set.

encoderPadding

public int encoderPadding

The number of samples to trim from the end of the decoded audio stream, or NO_VALUE if not set.

Public constructors

GaplessInfoHolder

public GaplessInfoHolder()

Creates a new holder for gapless playback information.

Public methods

hasGaplessInfo

public boolean hasGaplessInfo()

Returns whether encoderDelay and encoderPadding have been set.

setFromMetadata

public boolean setFromMetadata(Metadata metadata)

Populates the holder with data parsed from ID3 Metadata.

Parameters
Metadata metadata

The metadata from which to parse the gapless information.

Returns
boolean

Whether the holder was populated.