Mp3InfoReplayGain.GainField


public final class Mp3InfoReplayGain.GainField


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

Summary

Nested types

@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.

Constants

static final int

A gain adjustment that represents the ideal listening gain for each track.

static final int

A gain adjustment that makes all the tracks sound equally loud.

static final int

This gain adjustment was manually determined by the artist.

static final int

This gain adjustment was automatically determined by the ReplayGain algorithm.

static final int

This gain adjustment was automatically determined by a simple RMS algorithm.

static final int

The origin of this gain adjustment is not set.

static final int

This gain adjustment was manually determined by the user.

Public fields

final float

Absolute gain adjustment in decibels.

final int

Name/type of the gain field.

final int

Originator of the gain field, i.e. who determined the value / in what way it was determined.

Public methods

boolean
int
String

Constants

NAME_AUDIOPHILE

public static final int NAME_AUDIOPHILE = 2

A gain adjustment that represents the ideal listening gain for each track.

The problem with NAME_RADIO is that tracks which should be quiet will be brought up to the level of all the rest.

To solve this problem, the "Audiophile" setting represents the ideal listening gain for each track. ReplayGain can have a good guess at this too, by reading the entire CD, and calculating a single gain adjustment for the whole disc. This works because quiet tracks then stay quieter than the rest, since the gain won't be changed for each track. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall.

Where ReplayGain will fail is if you have an entire CD of quiet music. It will bring it up to an average level. This is why the "Audiophile" Replay Gain adjustment must be user adjustable. The ReplayGain whole disc value represents a good guess, and should be stored in the file. Later, the user can tweak it if required. If the file has originated from the artist, then the "Audiophile" setting can be specified by the artist. Naturally, the user is free to change the value if they desire.

NAME_RADIO

public static final int NAME_RADIO = 1

A gain adjustment that makes all the tracks sound equally loud.

This behaves like tracks do on the radio, hence the name. If the ReplayGain is calculated on a track-by-track basis (i.e. an individual ReplayGain calculation is carried out for each track), this will be the result.

ORIGINATOR_ARTIST

public static final int ORIGINATOR_ARTIST = 1

This gain adjustment was manually determined by the artist.

ORIGINATOR_REPLAYGAIN

public static final int ORIGINATOR_REPLAYGAIN = 3

This gain adjustment was automatically determined by the ReplayGain algorithm.

ORIGINATOR_SIMPLE_RMS

public static final int ORIGINATOR_SIMPLE_RMS = 4

This gain adjustment was automatically determined by a simple RMS algorithm.

ORIGINATOR_UNSET

public static final int ORIGINATOR_UNSET = 0

The origin of this gain adjustment is not set.

ORIGINATOR_USER

public static final int ORIGINATOR_USER = 2

This gain adjustment was manually determined by the user.

Public fields

gain

public final float gain

Absolute gain adjustment in decibels.

Positive values mean the signal should be amplified, negative values mean it should be attenuated.

Due to limitations of the storage format, this is only accurate to the first decimal place.

name

@Mp3InfoReplayGain.GainField.Name
public final int name

Name/type of the gain field.

originator

@Mp3InfoReplayGain.GainField.Originator
public final int originator

Originator of the gain field, i.e. who determined the value / in what way it was determined.

Either a human (user / artist) set the value according to their preferences, or an algorithm like ReplayGain or simple RMS average was used to determine it.

Public methods

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()

toString

public String toString()