# 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)

*** ** * ** ***

<br />

```
@UnstableApi
class Mp3InfoReplayGain : Metadata.Entry
```

<br />

*** ** * ** ***

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

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/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/kotlin/androidx/annotation/IntDef(value = , open = true) annotation https://developer.android.com/reference/kotlin/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/kotlin/androidx/annotation/IntDef(value = , open = true) annotation https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField.Originator` The originator of a gain field. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain#hashCode()()` |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain#parse(float,int,int)(peak: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, field1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, field2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Parses an instance from the packed representation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField?` | `https://developer.android.com/reference/kotlin/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/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain.GainField?` | `https://developer.android.com/reference/kotlin/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. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/mp3/Mp3InfoReplayGain#peak()` 32 bit floating point "Peak signal amplitude". |

### Inherited functions

From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>?` `https://developer.android.com/reference/kotlin/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/kotlin/androidx/media3/common/Format?` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(builder: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder!)`

Updates the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`.

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```

### hashCode

```
fun hashCode(): Int
```

### parse

```
java-static fun parse(peak: Float, field1: Int, field2: Int): Mp3InfoReplayGain?
```

Parses an instance from the packed representation.

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

### toString

```
fun toString(): String!
```

## Public properties

### field1

```
val field1: Mp3InfoReplayGain.GainField?
```

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

### field2

```
val field2: Mp3InfoReplayGain.GainField?
```

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

### peak

```
val peak: Float
```

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.