Exemple #1
0
 public override void InitializeComponent(ICore core)
 {
     this.Core   = core;
     this.Output = ComponentRegistry.Instance.GetComponent <IBassOutput>();
     this.BassStreamPipelineFactory = ComponentRegistry.Instance.GetComponent <IBassStreamPipelineFactory>();
     this.MetaDataManager           = core.Managers.MetaData;
     this.SignalEmitter             = core.Components.SignalEmitter;
     this.Configuration             = core.Components.Configuration;
     this.Configuration.GetElement <BooleanConfigurationElement>(
         BassOutputConfiguration.SECTION,
         BassReplayGainBehaviourConfiguration.ENABLED
         ).ConnectValue(value => this.Enabled = value);
     this.Configuration.GetElement <SelectionConfigurationElement>(
         BassOutputConfiguration.SECTION,
         BassReplayGainBehaviourConfiguration.MODE
         ).ConnectValue(option => this.Mode = BassReplayGainBehaviourConfiguration.GetMode(option));
     this.Configuration.GetElement <BooleanConfigurationElement>(
         BassOutputConfiguration.SECTION,
         BassReplayGainBehaviourConfiguration.ON_DEMAND
         ).ConnectValue(value => this.OnDemand = value);
     this.Configuration.GetElement <BooleanConfigurationElement>(
         BassOutputConfiguration.SECTION,
         BassReplayGainScannerBehaviourConfiguration.WRITE_TAGS
         ).ConnectValue(value => this.WriteTags = value);
     if (this.Output != null)
     {
         this.Output.Loaded   += this.OnLoaded;
         this.Output.Unloaded += this.OnUnloaded;
     }
     if (this.BassStreamPipelineFactory != null)
     {
         this.BassStreamPipelineFactory.CreatingPipeline += this.OnCreatingPipeline;
     }
     base.InitializeComponent(core);
 }
Exemple #2
0
 public IEnumerable <ConfigurationSection> GetConfigurationSections()
 {
     return(BassReplayGainBehaviourConfiguration.GetConfigurationSections());
 }