コード例 #1
0
ファイル: BpmService.cs プロジェクト: SyaskiMasyaski/banshee
        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;
            }
        }
コード例 #2
0
        public BpmEntry()
        {
            detector = BpmDetectJob.GetDetector();
            if (detector != null)
            {
                detector.FileFinished += OnFileFinished;
            }

            BuildWidgets();

            Destroyed += delegate {
                if (detector != null)
                {
                    detector.Dispose();
                    detector = null;
                }
            };
        }