/// <summary> /// Initializes this instance. /// </summary> public void Initialize() { sldVolume.Scrolled += new MediaSlider.MediaSlider.ScrollDelegate(sldVolume_Slid); sldVolume.Minimum = 0; sldVolume.Maximum = 100; SetVolume(Convert.ToInt32(BassPlayer.GetMonitorVolume())); }
public void SaveSettings() { var settings = Settings.Default; var winampPlugin = ""; if (BassPlayer.WaPlugin != null) { winampPlugin = BassPlayer.WaPlugin.Location; } settings.WaPlugin = winampPlugin; var mainVstPlugin = ""; if (BassPlayer.MainVstPlugin != null) { mainVstPlugin = BassPlayer.MainVstPlugin.Location; } settings.MainMixerVstPlugin = mainVstPlugin; var mainVstPlugin2 = ""; if (BassPlayer.MainVstPlugin2 != null) { mainVstPlugin2 = BassPlayer.MainVstPlugin2.Location; } settings.MainMixerVstPlugin2 = mainVstPlugin2; var mainVstPluginParameters = ""; if (BassPlayer.MainVstPlugin != null) { mainVstPluginParameters = PluginHelper.GetVstPluginParameters(BassPlayer.MainVstPlugin); } settings.MainMixerVstPluginParameters = mainVstPluginParameters; var mainVstPluginParameters2 = ""; if (BassPlayer.MainVstPlugin2 != null) { mainVstPluginParameters2 = PluginHelper.GetVstPluginParameters(BassPlayer.MainVstPlugin2); } settings.MainMixerVstPlugin2Parameters = mainVstPluginParameters2; var samplerVstPlugin = ""; if (BassPlayer.SamplerVstPlugin != null) { samplerVstPlugin = BassPlayer.SamplerVstPlugin.Location; } settings.SamplerVstPlugin = samplerVstPlugin; var samplerVstPluginParameters = ""; if (BassPlayer.SamplerVstPlugin != null) { samplerVstPluginParameters = PluginHelper.GetVstPluginParameters(BassPlayer.SamplerVstPlugin); } settings.SamplerVstPluginParameters = samplerVstPluginParameters; var samplerVstPlugin2 = ""; if (BassPlayer.SamplerVstPlugin2 != null) { samplerVstPlugin2 = BassPlayer.SamplerVstPlugin2.Location; } settings.SamplerVstPlugin2 = samplerVstPlugin2; var samplerVstPluginParameters2 = ""; if (BassPlayer.SamplerVstPlugin2 != null) { samplerVstPluginParameters2 = PluginHelper.GetVstPluginParameters(BassPlayer.SamplerVstPlugin2); } settings.SamplerVstPlugin2Parameters = samplerVstPluginParameters2; var trackVstPlugin = ""; if (BassPlayer.TrackVstPlugin != null) { trackVstPlugin = BassPlayer.TrackVstPlugin.Location; } settings.TrackVstPlugin = trackVstPlugin; var trackVstPluginParameters = ""; if (BassPlayer.TrackVstPlugin != null) { trackVstPluginParameters = PluginHelper.GetVstPluginParameters(BassPlayer.TrackVstPlugin); } settings.TrackVstPluginParameters = trackVstPluginParameters; var trackFxVstPlugin = ""; if (BassPlayer.TrackSendFxVstPlugin != null) { trackFxVstPlugin = BassPlayer.TrackSendFxVstPlugin.Location; } settings.TrackFxvstPlugin = trackFxVstPlugin; var trackFxVstPluginParameters = ""; if (BassPlayer.TrackSendFxVstPlugin != null) { trackFxVstPluginParameters = PluginHelper.GetVstPluginParameters(BassPlayer.TrackSendFxVstPlugin); } settings.TrackFxvstPluginParameters = trackFxVstPluginParameters; var trackFxVstPlugin2 = ""; if (BassPlayer.TrackSendFxVstPlugin2 != null) { trackFxVstPlugin2 = BassPlayer.TrackSendFxVstPlugin2.Location; } settings.TrackFxvstPlugin2 = trackFxVstPlugin2; var trackFxVstPluginParameters2 = ""; if (BassPlayer.TrackSendFxVstPlugin2 != null) { trackFxVstPluginParameters2 = PluginHelper.GetVstPluginParameters(BassPlayer.TrackSendFxVstPlugin2); } settings.TrackFxvstPlugin2Parameters = trackFxVstPluginParameters2; settings.LimitSongLength = UseConservativeFadeOut; settings.Volume = BassPlayer.GetMixerVolume(); settings.SamplerDelayNotes = BassPlayer.SamplerDelayNotes; settings.TrackFxDelayNotes = BassPlayer.TrackSendFxDelayNotes; settings.SamplerOutput = BassPlayer.SamplerOutput; settings.TrackOutput = BassPlayer.TrackOutput; settings.MonitorVolume = Convert.ToInt32(BassPlayer.GetMonitorVolume()); settings.RawLoopOutput = BassPlayer.RawLoopOutput; settings.EnableTrackFxAutomation = BassPlayer.TrackFxAutomationEnabled; settings.EnableSampleAutomation = BassPlayer.SampleAutomationEnabled; settings.Save(); }