Stay organized with collections Save and categorize content based on your preferences.

GaplessInfoHolder

@UnstableApi
class GaplessInfoHolder


Holder for gapless playback information.

Summary

Public constructors

Creates a new holder for gapless playback information.

Public functions

Boolean

Returns whether encoderDelay and encoderPadding have been set.

Boolean

Populates the holder with data parsed from ID3 Metadata.

Boolean

Populates the holder with data from an MP3 Xing header, if valid and non-zero.

Public properties

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

GaplessInfoHolder

GaplessInfoHolder()

Creates a new holder for gapless playback information.

Public functions

hasGaplessInfo

fun hasGaplessInfo(): Boolean

Returns whether encoderDelay and encoderPadding have been set.

setFromMetadata

fun setFromMetadata(metadata: Metadata!): Boolean

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.

setFromXingHeaderValue

fun setFromXingHeaderValue(value: Int): Boolean

Populates the holder with data from an MP3 Xing header, if valid and non-zero.

Parameters
value: Int

The 24-bit value to decode.

Returns
Boolean

Whether the holder was populated.

Public properties

encoderDelay

val encoderDelayInt

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

encoderPadding

val encoderPaddingInt

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