Example #1
0
 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 ();
 }
Example #2
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);
            });
        }
Example #3
0
            private void OnFileFinished(object o, BpmEventArgs args)
            {
                Hyena.ThreadAssist.ProxyToMain (delegate {
                //                    if (track.Uri != args.Uri || args.Bpm == 0) {
                //                        return;
                //                    }

                    int id = DatabaseTrackInfo.GetTrackIdForUri(args.Uri);
                    if (id >= 0) {
                //                        int index = (int)TrackCache.IndexOf ((long)id); // auch nicht accessible...?
                        Hyena.Log.Debug("NoNoise - BPM...Track index: " +
                                        ServiceManager.SourceManager.MusicLibrary.GetTrackIdForUri(args.Uri));
                //                        if (index >= 0) {
                //                            TrackInfo track = TrackModel[index];
                //                            if (track != null) {
                //
                //                            }
                //                        }
                    }

                    Hyena.Log.Debug("NoNoise - BPM...Track ID: " + ServiceManager.SourceManager.MusicLibrary
                                    .GetTrackIdForUri(args.Uri));

                    Bpm = args.Bpm;
                    Hyena.Log.DebugFormat ("NoNoise - Detected BPM of {0} for {1}", Bpm, args.Uri);
                });
            }