# Mp3InfoReplayGain

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/mp3/Mp3InfoReplayGain.java+class:androidx.media3.extractor.mp3.Mp3InfoReplayGain)

*** ** * ** ***


```
@UnstableApi
public final class Mp3InfoReplayGain implements Metadata.Entry
```

<br />

*** ** * ** ***

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

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField` A gain field can store one gain adjustment with name and originator metadata. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/androidx/annotation/IntDef(value = , open = true) public annotation https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField.Name` The name of a gain field. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/androidx/annotation/IntDef(value = , open = true) public annotation https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField.Originator` The originator of a gain field. |

| ### Public fields |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#field1()` The first of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#field2()` The second of two gain fields in the LAME MP3 Info header, or null if the field is invalid or unset. |
| `final float` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#peak()` 32 bit floating point "Peak signal amplitude". |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `int` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#hashCode()()` |
| `static @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#parse(float,int,int)(float peak, int field1, int field2)` Parses an instance from the packed representation. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/extractor/mp3/Mp3InfoReplayGain#toString()()` |

| ### Inherited methods |
|---|
| From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/androidx/media3/common/Metadata.Entry) |---|---| | `@https://developer.android.com/reference/androidx/annotation/Nullable byte[]` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()()` Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata. | | `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()` Returns the `https://developer.android.com/reference/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata. | | `void` | `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(https://developer.android.com/reference/androidx/media3/common/MediaMetadata.Builder builder)` Updates the `https://developer.android.com/reference/androidx/media3/common/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()
```