コード例 #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
ファイル: Tests.cs プロジェクト: aidan-g/BASS_REPLAY_GAIN
 public void TearDown()
 {
     BassReplayGain.Free();
     Bass.Free();
 }