private void _SaveConfig() { int volume = _SelectSlides[_SelectSlideVolume].Selection * 5; CConfig.SetVolumeByType(CGraphics.CurrentScreen.CurrentMusicType, volume); CConfig.SaveConfig(); CSound.SetGlobalVolume(volume); }
private void _SaveConfig() { CConfig.GameMusicVolume = _SelectSlides[_SelectSlideGameMusicVolume].Selection * 5; CConfig.PreviewMusicVolume = _SelectSlides[_SelectSlidePreviewMusicVolume].Selection * 5; CConfig.Config.Sound.BackgroundMusic = (EBackgroundMusicOffOn)_SelectSlides[_SelectSlideBackgroundMusic].Selection; CConfig.Config.Sound.BackgroundMusicSource = (EBackgroundMusicSource)_SelectSlides[_SelectSlideBackgroundMusicSource].Selection; CConfig.BackgroundMusicVolume = _SelectSlides[_SelectSlideBackgroundMusicVolume].Selection * 5; if (CConfig.Config.Sound.PlayBackLib == EPlaybackLib.GstreamerSharp) { CConfig.Config.Sound.KaraokeEffect = (EOffOn)_SelectSlides[_SelectSlideKaraokeEffect].Selection; } CConfig.SaveConfig(); CBackgroundMusic.SetMusicSource(CConfig.Config.Sound.BackgroundMusicSource); CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume); if (CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_ON) { CBackgroundMusic.Play(); } else { CBackgroundMusic.Stop(); } }