protected override void Cleanup() { if (detector != null) { detector.FileFinished -= OnFileFinished; detector.Dispose(); detector = null; } base.Cleanup(); }
public BpmEntry () { detector = BpmDetectJob.GetDetector (); if (detector != null) { detector.FileFinished += OnFileFinished; } BuildWidgets (); Destroyed += delegate { if (detector != null) { detector.Dispose (); detector = null; } }; }
public BpmEntry() { detector = BpmDetectJob.GetDetector(); if (detector != null) { detector.FileFinished += OnFileFinished; } BuildWidgets(); Destroyed += delegate { if (detector != null) { detector.Dispose(); detector = null; } }; }
internal static IBpmDetector GetDetector() { IBpmDetector detector = null; foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/Banshee/MediaEngine/BpmDetector")) { try { detector = (IBpmDetector)node.CreateInstance(typeof(IBpmDetector)); } catch (Exception e) { Log.Exception(e); } if (detector != null) { break; } } return(detector); }
protected override void Init() { detector = GetDetector (); detector.FileFinished += OnFileFinished; }
protected override void Cleanup() { if (detector != null) { detector.FileFinished -= OnFileFinished; detector.Dispose (); detector = null; } base.Cleanup (); }
internal static IBpmDetector GetDetector() { IBpmDetector detector = null; foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes ("/Banshee/MediaEngine/BpmDetector")) { try { detector = (IBpmDetector)node.CreateInstance (typeof (IBpmDetector)); } catch (Exception e) { Log.Error (e); } if (detector != null) { break; } } return detector; }
protected override void Init() { detector = GetDetector(); detector.FileFinished += OnFileFinished; }
public CustomView() { Hyena.Log.Debug("NoNoise - CustomView constructor"); session = new Session(API_KEY, API_SECRET); db = new NoNoiseDBHandler (); if (dotests) PerformTests (); // PCA if (dopca) PcaForMusicLibrary (); // TrackInfo in NoNoise DB if (saveTrackInfosToDB) WriteTrackInfosToDB (); // BPM detector detector = BpmDetectJob.GetDetector (); if (detector != null) { detector.FileFinished += OnFileFinished; Hyena.Log.Debug("NoNoise - Detector is not null"); } // using Active Source Source source = ServiceManager.SourceManager.ActiveSource; ITrackModelSource track_source = source as ITrackModelSource; if (track_source != null) { Hyena.Log.Debug("NoNoise - TS name: " + track_source.Name); Hyena.Log.Debug("NoNoise - TS count: " + track_source.Count); Hyena.Log.Debug("NoNoise - TS generic name: " + track_source.GenericName); } // using MusicLibrary if (doprintlib) PrintMusicLibrary(); // selection test if (doprintselection) PrintSelection (); // button handler button.Pressed += ButtonPushHandler; button.Label = "get artist info"; bw.Add(button); w.Add(emptylabel); w.Add(bw); w.ShowAll(); }