Esempio n. 1
0
        private void onEffectDrawn(object o, EventArgs e)
        {
            if (saoPlayer.isPlay())
            {
                specturm.Source = BitMap.ChangeBitmapToImageSource(saoPlayer.getVisual().CreateSpectrumLinePeak(saoPlayer.getStream(), Draw_Width, Draw_Height, DrawColor1, DrawColor2, PeakColor, DrawBackgound, LineWidth, 3, 1, 30, false, false, true));
            }
            else
            {
                effectTimer.Stop();
            }

            //window.Content = this.Content = "W: " + Draw_Width + "H: " + Draw_Height;
        }
Esempio n. 2
0
 private void onEffectDrawn(object o, EventArgs e)
 {
     //if (saoPlayer.isPlay()) specturm.Source = BitMap.CreateBitmapSourceFromBitMap(saoPlayer.getVisual().CreateSpectrumLinePeak(saoPlayer.getStream(), Draw_Width, Draw_Height, DrawColor1, DrawColor2, PeakColor, DrawBackgound, LineWidth, 3, 1, 30, false, false, true));
     if (saoPlayer.isPlay())
     {
         specturm.Source = BitMap.ChangeBitmapToImageSource(saoPlayer.getVisual().CreateSpectrumLinePeak(saoPlayer.getStream(), Draw_Width, Draw_Height, DrawColor1, DrawColor2, PeakColor, DrawBackgound, LineWidth, 3, 1, 30, false, false, true));
     }
     else
     {
         effectTimer.Stop();
         observersOnStop();
     }
 }
Esempio n. 3
0
        public SpectrumWidget(SAOPlayer sPlayer)
        {
            InitializeComponent();

            saoPlayer = sPlayer;
            //频谱计时器
            effectTimer          = new DispatcherTimer();
            effectTimer.Interval = TimeSpan.FromMilliseconds(1);
            effectTimer.Tick    += onEffectDrawn;


            if (saoPlayer.isPlay())
            {
                onPlay();
            }
        }