apply bg music options changes immediately

This commit is contained in:
Alexander Eckart committed 2012-02-20 18:12:26 +01:00
1 parent 7f2fe5f4d8
commit 93edc6d174
2 files changed
+15

No files matched your search

+8
View File
@@ -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);
}
}
}
}
+7
View File
@@ -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();
}