Exemplo n.º 1
0
        public async void SetEqualizerUI(VLCEqualizer eq)
        {
            if (eq == null)
            {
                return;
            }

            await DispatchHelper.InvokeAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                for (int i = 0; i < eq.Amps.Count; i++)
                {
                    var anim            = new DoubleAnimation();
                    anim.Duration       = TimeSpan.FromMilliseconds(600);
                    anim.EasingFunction = new ExponentialEase()
                    {
                        EasingMode = EasingMode.EaseOut,
                        Exponent   = 3,
                    };
                    anim.To = Convert.ToDouble(eq.Amps[i]);
                    anim.EnableDependentAnimation = true;

                    Storyboard.SetTarget(anim, RootGrid.Children[i]);
                    Storyboard.SetTargetProperty(anim, nameof(Slider.Value));

                    var sb = new Storyboard();
                    sb.Children.Add(anim);
                    sb.Begin();
                }
            });
        }
Exemplo n.º 2
0
        public void SetEqualizer(VLCEqualizer vlcEq)
        {
            var eq = new Equalizer(vlcEq.Index);

            MediaPlayer?.setEqualizer(eq);
        }