예제 #1
0
        private void timerUpdate_Tick(object sender, EventArgs e)
        {
            // here we gather info about the stream, when it is playing...
            if (_handle == 0 || Bass.ChannelIsActive(_handle) != PlaybackState.Playing && Bass.ChannelIsActive(_handle) != PlaybackState.Paused)
            {
                // the stream is NOT playing anymore...
                _UpdateTimer.Stop();
                _PositionTrack.Value = 0;
                picSpectrum.Image    = null;
                _vis.ClearPeaks();
                return;
            }

            // from here on, the stream is for sure playing...
            _TickCounter++;

            if (_TickCounter == 2)
            {
                _TickCounter = 0;

                this.labelInfo.Text = string.Format("{0:#0.00} / {1:#0.00}", Utils.TSHMSF(Position), Utils.TSHMSF(_Length));
            }

            _PositionTrack.Value = (int)(Math.Round((Position / _Length), 2) * _PositionTrack.Maximum);

            // update spectrum
            DrawSpectrum();
        }
예제 #2
0
 /// <summary>
 /// Стоп
 /// </summary>
 public static void Stop()
 {
     if (Visualisation != null)
     {
         Visualisation.ClearPeaks();
     }
     Bass.BASS_ChannelStop(Stream);
     Bass.BASS_StreamFree(Stream);
     isStoped = true;
 }
예제 #3
0
 private void pictureBoxSpectrum_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         spectId++;
     }
     else
     {
         spectId--;
     }
     if (spectId > 15)
     {
         spectId = 0;
     }
     if (spectId < 0)
     {
         spectId = 15;
     }
     lblVisible.Text          = String.Format("{0} of 16 (click L/R mouse to change)", spectId + 1);
     pictureBoxSpectrum.Image = null;
     vis.ClearPeaks();
 }
예제 #4
0
        private void pictureBoxSpectrum_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                _specIdx++;
            }
            else
            {
                _specIdx--;
            }

            if (_specIdx > 15)
            {
                _specIdx = 0;
            }
            if (_specIdx < 0)
            {
                _specIdx = 15;
            }

            Options.MainSettings.PlayerSpectrumIndex = _specIdx;
            pictureBoxSpectrum.Image = null;
            _vis.ClearPeaks();
        }
예제 #5
0
 private void pictureBoxSpectrum_Click(object sender, System.EventArgs e)
 {
     _vis.ClearPeaks();
 }