diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 34b240a9..69c5e549 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -91,5 +91,13 @@ namespace Vocaluxe.Base } } } + + public static void ApplyVolume() + { + for (int i = 0; i < _BackgroundMusicStreams.Count; i++) + { + CSound.SetStreamVolume(_BackgroundMusicStreams[i], CConfig.BackgroundMusicVolume); + } + } } } diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index f03c7b07..1c3cca41 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -128,7 +128,14 @@ namespace Vocaluxe.Screens private void SaveConfig() { CConfig.BackgroundMusic = (EOffOn)SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].Selection; + + if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) + CBackgroundMusic.Play(); + else + CBackgroundMusic.Pause(); + CConfig.BackgroundMusicVolume = SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection * 5; + CBackgroundMusic.ApplyVolume(); CConfig.SaveConfig(); }