예제 #1
0
 public void Scan()
 {
     Logger.Write(this, LogLevel.Debug, "Initializing BASS (NoSound).");
     Bass.Init(Bass.NoSoundDevice);
     BassReplayGain.Init();
     try
     {
         if (this.Threads > 1)
         {
             Logger.Write(this, LogLevel.Debug, "Beginning parallel scanning with {0} threads.", this.Threads);
         }
         else
         {
             Logger.Write(this, LogLevel.Debug, "Beginning single threaded scanning.");
         }
         var scannerItems  = default(IEnumerable <ScannerItem>);
         var scannerGroups = default(IEnumerable <IEnumerable <ScannerItem> >);
         this.GetGroups(out scannerItems, out scannerGroups);
         this.ScanTracks(scannerItems);
         this.ScanGroups(scannerGroups);
         Logger.Write(this, LogLevel.Debug, "Scanning completed successfully.");
     }
     finally
     {
         Logger.Write(this, LogLevel.Debug, "Releasing BASS (NoSound).");
         BassReplayGain.Free();
         Bass.Free();
     }
 }
예제 #2
0
 protected virtual void OnDisposing()
 {
     if (this.Output != null)
     {
         this.Output.Loaded   -= this.OnLoaded;
         this.Output.Unloaded -= this.OnUnloaded;
     }
     if (this.BassStreamPipelineFactory != null)
     {
         this.BassStreamPipelineFactory.CreatingPipeline -= this.OnCreatingPipeline;
     }
     BassReplayGain.Free();
 }
예제 #3
0
 public void TearDown()
 {
     BassReplayGain.Free();
     Bass.Free();
 }