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(); } }
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(); }
public void TearDown() { BassReplayGain.Free(); Bass.Free(); }