void IExtensionService.Initialize () { Banshee.MediaEngine.IBpmDetector detector = BpmDetectJob.GetDetector (); if (detector == null) { throw new ApplicationException ("No BPM detector available"); } else { detector.Dispose (); } if (!ServiceStartup ()) { ServiceManager.SourceManager.SourceAdded += OnSourceAdded; } }
public void Detect () { if (!Enabled) { return; } lock (sync) { if (job != null) { return; } else { job = new BpmDetectJob (); } } job.Finished += delegate { job = null; }; }
public BpmEntry() { detector = BpmDetectJob.GetDetector(); if (detector != null) { detector.FileFinished += OnFileFinished; } BuildWidgets(); Destroyed += delegate { if (detector != null) { detector.Dispose(); detector = null; } }; }
public void Detect() { if (!Enabled) { return; } lock (sync) { if (job != null) { return; } else { job = new BpmDetectJob (); } } job.Finished += delegate { job = null; }; }