Exemple #1
0
        /// <summary>
        ///     <para>Sets the boost or attenuation in dB.</para>
        ///     <para>Only if [peaking, high/low shelf only] <see cref="Filter" />.</para>
        ///     <para><c>-30.0 </c>to <c>30.0</c>. Default = <c>0.0</c>.</para>
        /// </summary>
        /// <param name="band">The band to apply the gain to.</param>
        /// <param name="gain">The gain.</param>
        public void SetGain(Band band, float gain)
        {
            var index   = (int)band * 4 + 3;
            var clamped = gain.Clamp(-30.0f, 30.0f);

            SetParameterFloat(index, clamped);
            GainChanged?.Invoke(this, new MultiBandEqEventArgs(index, band, clamped, -30.0f, 30.0f));
        }
Exemple #2
0
 private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     GainChanged?.Invoke(this, new GainChangedEventArgs(parent.Children.IndexOf((UIElement)sender), (float)e.NewValue));
 }