/// <summary> /// Gain is applied "first" to the audio data, much as in a physical or /// software mixer. Later steps in the flow of audio apply "channel" level /// (e.g. AutomationLevel) and mixing group level (e.g. GroupLevel) before /// the audio is output. /// /// This method, taking a LUFS gain value and a LUFS true audio peak value, /// is used for mixing in the loudness-metadata-base gain value, when available. /// </summary> public void SetGain(Lufs gain, Lufs?truePeak) { if (Equals(_gain, gain)) { return; } _gain = gain; _truePeak = truePeak; if (SoundGroup == ESoundGroup.SongPlayback) { Trace.TraceInformation($"{nameof(CSound)}.{nameof(SetGain)}: Gain: {_gain}. True Peak: {_truePeak}"); } SetVolume(); }
public Lufs Min(Lufs lufs) { return(new Lufs(Math.Min(_value, lufs._value))); }
public LoudnessMetadata(Lufs integrated, Lufs?truePeak) { Integrated = integrated; TruePeak = truePeak; }