docs: improve documentation

This commit is contained in:
ThetaDev 2023-05-13 00:08:14 +02:00
parent a2bbc850a7
commit a6bf9359b9
20 changed files with 323 additions and 45 deletions

View file

@ -257,15 +257,15 @@ pub struct AudioStream {
pub codec: AudioCodec,
/// Number of audio channels
pub channels: Option<u8>,
/// Audio loudness for ReplayGain correction
/// Audio loudness for volume normalization
///
/// The track volume correction factor (0-1) can be calculated using this formula
///
/// `10^(-loudness_db/20)`
///
/// Note that the value is the inverse of the usual track gain parameter, i.e. a
/// value of 6 means the volume should be reduced by 6dB and the ReplayGain track gain
/// parameter would be -6.
/// Note that the `loudness_db` value is the inverse of the usual ReplayGain track gain
/// parameter, i.e. a value of 6 means the volume should be reduced by 6dB and the
/// track gain parameter would be -6.
///
/// More information about ReplayGain and how to apply this infomation to audio files
/// can be found here: <https://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification>.