Mp3InfoReplayGain


@UnstableApi
public final class Mp3InfoReplayGain implements Metadata.Entry


Representation of the ReplayGain data stored in a LAME Xing or Info frame.

Summary

Nested types

public final class Mp3InfoReplayGain.GainField

A gain field can store one gain adjustment with name and originator metadata.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = ElementType.TYPE_USE)
@IntDef(value = , open = true)
public annotation Mp3InfoReplayGain.GainField.Name

The name of a gain field.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = ElementType.TYPE_USE)
@IntDef(value = , open = true)
public annotation Mp3InfoReplayGain.GainField.Originator

The originator of a gain field.

Public fields

@Nullable Mp3InfoReplayGain.GainField

The first of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset.

@Nullable Mp3InfoReplayGain.GainField

The second of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset.

final float

32 bit floating point "Peak signal amplitude".

Public methods

boolean
int
static @Nullable Mp3InfoReplayGain
parse(float peak, int field1, int field2)

Parses an instance from the packed representation.

String

Inherited methods

From androidx.media3.common.Metadata.Entry
@Nullable byte[]

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

@Nullable Format

Returns the Format that can be used to decode the wrapped metadata in getWrappedMetadataBytes, or null if this Entry doesn't contain wrapped metadata.

void

Updates the MediaMetadata.Builder with the type-specific values stored in this Entry.

Public fields

field1

public @Nullable Mp3InfoReplayGain.GainField field1

The first of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset.

field2

public @Nullable Mp3InfoReplayGain.GainField field2

The second of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset.

peak

public final float peak

32 bit floating point "Peak signal amplitude".

1.0 is maximal signal amplitude store-able in decoding format. 0.8 is 80% of maximal signal amplitude store-able in decoding format. 1.5 is 150% of maximal signal amplitude store-able in decoding format.

A value above 1.0 can occur for example due to "true peak" measurement. A value of 0.0 means the peak signal amplitude is unknown.

Public methods

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()

parse

public static @Nullable Mp3InfoReplayGain parse(float peak, int field1, int field2)

Parses an instance from the packed representation.

Returns null if the representation is invalid or should be ignored.

toString

public String toString()