Exemple #1
0
 void link_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
 {
     if (e.Uri.AbsoluteUri == "about:bass")
     {
         BeatDetector.ShowAbout();
     }
     else
     {
         Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
     }
     e.Handled = true;
 }
Exemple #2
0
 private void StartStopBeatDetect()
 {
     if (_beatDetectEnabled)
     {
         if (_beatDetector != null)
         {
             _beatDetector.Stop();
             _beatDetector = null;
         }
         _beatDetector         = new BeatDetector();
         _beatDetector.OnBeat += delegate { _dispatcher.BeginInvoke(new Action(_beatDetector_OnBeat), DispatcherPriority.SystemIdle, null); };
         _beatDetector.Start(_audioDevice);
     }
     else
     {
         if (_beatDetector != null)
         {
             _beatDetector.Stop();
             _beatDetector = null;
         }
     }
 }