Exemple #1
0
        //private bool _zoomed = false;
        //private int _zoomStart = -1;
        //private long _zoomStartBytes = -1;
        //private int _zoomEnd = -1;
        //private float _zoomDistance = 5.0f; // zoom = 5sec
        //private WaveForm _WF = null;
        // Waveform editor



        private void Button_Click_2(object sender, RoutedEventArgs e) // Stop
        {
            BassUses.Stop();
            if (timer1 == null)
            {
                return;
            }
            timer1.IsEnabled = false;
            slTime.Value     = 0;
            label1.Content   = "00:00:00";
        }
Exemple #2
0
 private void Button_Click_1(object sender, RoutedEventArgs e) // Play
 {
     if ((playlist.Items.Count != 0) && (playlist.SelectedIndex != -1))
     {
         string current = Vars.Files[playlist.SelectedIndex];
         BassUses.Play(current, BassUses.Volume);
         label1.Content  = TimeSpan.FromSeconds(BassUses.GetPosOfStream(BassUses.Stream)).ToString();
         label2.Content  = TimeSpan.FromSeconds(BassUses.GetTimeOfStream(BassUses.Stream)).ToString();
         slTime.Maximum  = BassUses.GetTimeOfStream(BassUses.Stream);
         slTime.Value    = BassUses.GetPosOfStream(BassUses.Stream);
         timer1          = new DispatcherTimer();
         timer1.Tick    += new EventHandler(timer_Tick);
         timer1.Interval = new TimeSpan(0, 0, 1);
         timer1.Start();
     }
 }
Exemple #3
0
 private void slTime_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     BassUses.SetPosOfScroll(BassUses.Stream, slTime.Value);
 }
Exemple #4
0
 private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) // Volume Level
 {
     BassUses.SetVolumeToStream(BassUses.Stream, slVol.Value);
 }
Exemple #5
0
 private void timer_Tick(object sender, EventArgs e)
 {
     label1.Content = TimeSpan.FromSeconds(BassUses.GetPosOfStream(BassUses.Stream)).ToString();
     slTime.Value   = BassUses.GetPosOfStream(BassUses.Stream);
     int level = Bass.BASS_ChannelGetLevel(_mixer);
 }