The peak level metadata can be used to prevent gain adjustments from inducing clipping in the playback device. ReplayGain-capable audio players use the replay gain metadata to automatically attenuate or amplify the signal on a per-track or per-album basis such that tracks or albums play at a similar loudness level. Typically, the replay gain and peak level values are then stored as metadata in the audio file. The difference between the measured perceived loudness and the desired target loudness is calculated this is considered the ideal replay gain value. Equal-loudness contours are used to compensate for frequency effects and statistical analysis is used to accommodate for effects related to time. ReplayGain works by first performing a psychoacoustic analysis of an entire audio track or album to measure peak level and perceived loudness.