/// <summary> /// Set the <see cref="UsedRolloffFunc"/> to match the user's <see cref="VolumeRolloff"/> setting. /// </summary> void SetRolloff() { UsedRolloffFunc = (LastRolloff = VolumeRolloff) switch { Rolloffs.Logarithmic => RolloffLogarithmic, Rolloffs.Linear => RolloffLinear, Rolloffs.Real => RolloffReal, _ => RolloffDisabled, }; }
public void RollOffTests(ChannelSources src, Rolloffs val) { ParametersField parameters = new ParametersField(src); string text = "O" + (short)val; parameters.EvaluateParameters(text); Assert.AreEqual(val, parameters.Rolloff); Assert.AreEqual(val.Equals(Rolloffs.ROLLOFF_AUTO) ? string.Empty : text, parameters.ToString()); }
/// <summary> /// Copy the settings of another <see cref="Source"/>. /// </summary> /// <param name="from">Target source</param> public void CopySettings(Source from) { Clip = from.Clip; IsPlaying = from.IsPlaying; Loop = from.Loop; Mute = from.Mute; LFE = from.LFE; screenLocked = from.screenLocked; Volume = from.Volume; Pitch = from.Pitch; stereoPan = from.stereoPan; SpatialBlend = from.SpatialBlend; Size = from.Size; DopplerLevel = from.DopplerLevel; VolumeRolloff = from.VolumeRolloff; SpatialFilter = from.SpatialFilter; DistanceSimulation = from.DistanceSimulation; TimeSamples = from.TimeSamples; }