private void OnFileFinished(object o, BpmEventArgs args)
 {
     // This is run on the main thread b/c of GStreamer, so do as little as possible here
     result_uri = args.Uri;
     result_bpm = args.Bpm;
     result_ready_event.Set();
 }
Beispiel #2
0
 private void BeatDetector_BpmDetected(object sender, BpmEventArgs e)
 {
     if (!IsDisposed && !Disposing)
     {
         bpmCounter.Invoke(new Action(() =>
         {
             bpmCounter.Text = e.AvgBpm.ToString("#");
         }));
     }
 }
Beispiel #3
0
        private void OnFileFinished(object o, BpmEventArgs args)
        {
            ThreadAssist.ProxyToMain(delegate {
                detect_button.Sensitive = true;

                if (track.Uri != args.Uri || args.Bpm == 0)
                {
                    return;
                }

                Log.DebugFormat("Detected BPM of {0} for {1}", args.Bpm, args.Uri);
                Bpm = args.Bpm;
                OnChanged(null, null);
            });
        }
Beispiel #4
0
 private void updateBpm(object sender, BpmEventArgs e)
 {
     bpmTB.Text    = e.bpm.ToString();
     _musicPieceId = e.Id;
 }