diff --git a/Output/Languages/en.xml b/Output/Languages/en.xml index bbfb85da..5954596e 100644 --- a/Output/Languages/en.xml +++ b/Output/Languages/en.xml @@ -238,6 +238,7 @@ Background-music source Preview-music volume Game-music volume + Sound effect volume Karaoke effect Theme Options Theme diff --git a/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt b/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt index f12bf489..dbbb1efc 100644 --- a/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt +++ b/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt @@ -1,5 +1,15 @@ ScreenOptionsSound +++++++++++ +Version 5: + +Add: + + + +and text for the description +"TR_SCREENOSOUND_SOUNDEFFECTVOLUME" + ++++++++++ Version 4: diff --git a/Output/Themes/Vocaluxe 2024/Screens/ScreenOptionsSound.xml b/Output/Themes/Vocaluxe 2024/Screens/ScreenOptionsSound.xml index 7f53bddc..e57e67e9 100644 --- a/Output/Themes/Vocaluxe 2024/Screens/ScreenOptionsSound.xml +++ b/Output/Themes/Vocaluxe 2024/Screens/ScreenOptionsSound.xml @@ -2,7 +2,7 @@ ScreenOptionsSound - 4 + 5 @@ -111,7 +111,7 @@ Outline TR_SCREENOSOUND_GAMEMUSICVOLUME - + 112.5 610.5 0 @@ -123,6 +123,20 @@ Center Outline + TR_SCREENOSOUND_SOUNDEFFECTVOLUME + + + 112.5 + 700.5 + 0 + 40.5 + 0 + + + Left + Center + + Outline TR_SCREENOSOUND_KARAOKEEFFECT @@ -376,7 +390,7 @@ Bold 3 - + SelectSlideArrowLeft SelectSlideArrowRight @@ -418,6 +432,48 @@ Bold 3 + + + SelectSlideArrowLeft + SelectSlideArrowRight + SelectSlide + SelectSlideArrowLeft + SelectSlideArrowRight + + 750 + 690 + 1072.5 + 75 + 0 + + + 757.5 + 697.5 + 60 + 60 + 0 + + + 1755 + 697.5 + 60 + 60 + 0 + + + + + + + + 40.5 + 75 + 0 + 750 + Outline + Bold + 3 + diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 926e6c3f..d8d5402c 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -151,6 +151,8 @@ namespace Vocaluxe.Base public int PreviewMusicVolume; [XmlRanged(0, 100), DefaultValue(80)] public int GameMusicVolume; + [XmlRanged(0, 100), DefaultValue(80)] + public int SoundEffectVolume; [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn KaraokeEffect; [XmlRanged(0, 1), DefaultValue(1.0f)] @@ -326,6 +328,16 @@ namespace Vocaluxe.Base } } + public static int SoundEffectVolume + { + get { return Config.Sound.SoundEffectVolume; } + set + { + Config.Sound.SoundEffectVolume = value.Clamp(0, 100); + SaveConfig(); + } + } + public static int PreviewMusicVolume { get { return Config.Sound.PreviewMusicVolume; } @@ -497,6 +509,8 @@ namespace Vocaluxe.Base return "Preview Volume from 0 to 100"; case "GameMusicVolume": return "Game Volume from 0 to 100"; + case "SoundEffectVolume": + return "Sound Effect Volume from 0 to 100"; case "KaraokeEffect": return "Apply a karaoke effect to song playback (EPlaybackLib.GstreamerSharp only)"; case "KaraokeEffectLevel": diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 8f5b260d..ba49b477 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -199,7 +199,7 @@ namespace Vocaluxe.Screens if (_ParticleEffects[_ParticleEffectNew[p]].Visible && !_HasPlayedSound) { - _HighscoreStream = CScreenHighscore.PlaySound(ESounds.Highscore, CConfig.GameMusicVolume); + _HighscoreStream = CScreenHighscore.PlaySound(ESounds.Highscore, CConfig.SoundEffectVolume); _HasPlayedSound = true; } } diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index cf6afcec..7f98e361 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -27,7 +27,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 4; } + get { return 5; } } private const string _SelectSlideBackgroundMusic = "SelectSlideBackgroundMusic"; @@ -35,6 +35,7 @@ namespace Vocaluxe.Screens private const string _SelectSlideBackgroundMusicSource = "SelectSlideBackgroundMusicSource"; private const string _SelectSlidePreviewMusicVolume = "SelectSlidePreviewMusicVolume"; private const string _SelectSlideGameMusicVolume = "SelectSlideGameMusicVolume"; + private const string _SelectSlideSoundEffectVolume = "SelectSlideSoundEffectVolume"; private const string _SelectSlideKaraokeEffect = "SelectSlideKaraokeEffect"; private const string _ButtonExit = "ButtonExit"; @@ -47,7 +48,7 @@ namespace Vocaluxe.Screens _ThemeButtons = new string[] {_ButtonExit}; _ThemeSelectSlides = new string[] - {_SelectSlideBackgroundMusic, _SelectSlideBackgroundMusicVolume, _SelectSlideBackgroundMusicSource, _SelectSlidePreviewMusicVolume, _SelectSlideGameMusicVolume, _SelectSlideKaraokeEffect}; + {_SelectSlideBackgroundMusic, _SelectSlideBackgroundMusicVolume, _SelectSlideBackgroundMusicSource, _SelectSlidePreviewMusicVolume, _SelectSlideGameMusicVolume, _SelectSlideSoundEffectVolume, _SelectSlideKaraokeEffect}; } public override void LoadTheme(string xmlPath) @@ -65,6 +66,9 @@ namespace Vocaluxe.Screens _SelectSlides[_SelectSlideGameMusicVolume].AddValues(new string[] {"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"}); _SelectSlides[_SelectSlideGameMusicVolume].Selection = CConfig.GameMusicVolume / 5; + _SelectSlides[_SelectSlideSoundEffectVolume].AddValues(new string[] + {"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"}); + _SelectSlides[_SelectSlideSoundEffectVolume].Selection = CConfig.SoundEffectVolume / 5; if (CConfig.Config.Sound.PlayBackLib == EPlaybackLib.GstreamerSharp) { _SelectSlides[_SelectSlideKaraokeEffect].SetValues((int)CConfig.Config.Sound.KaraokeEffect); @@ -144,12 +148,14 @@ namespace Vocaluxe.Screens _BackgroundMusicVolume = CConfig.BackgroundMusicVolume; _SelectSlides[_SelectSlideGameMusicVolume].Selection = CConfig.GameMusicVolume / 5; + _SelectSlides[_SelectSlideSoundEffectVolume].Selection = CConfig.SoundEffectVolume / 5; _SelectSlides[_SelectSlidePreviewMusicVolume].Selection = CConfig.PreviewMusicVolume / 5; } private void _SaveConfig() { CConfig.GameMusicVolume = _SelectSlides[_SelectSlideGameMusicVolume].Selection * 5; + CConfig.SoundEffectVolume = _SelectSlides[_SelectSlideSoundEffectVolume].Selection * 5; CConfig.PreviewMusicVolume = _SelectSlides[_SelectSlidePreviewMusicVolume].Selection * 5; CConfig.Config.Sound.BackgroundMusic = (EBackgroundMusicOffOn)_SelectSlides[_SelectSlideBackgroundMusic].Selection; CConfig.Config.Sound.BackgroundMusicSource = (EBackgroundMusicSource)_SelectSlides[_SelectSlideBackgroundMusicSource].Selection; @@ -168,4 +174,4 @@ namespace Vocaluxe.Screens CBackgroundMusic.Stop(); } } -} \ No newline at end of file +} diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index 236930b9..ed3a796e 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -274,7 +274,7 @@ namespace Vocaluxe.Screens double duration = Math.Min(maxPoints / 10000.0, 1.0) * 5; // Play the sound - _ProgressBarSoundStream = PlaySound(ESounds.ProgressBar, CConfig.GameMusicVolume); + _ProgressBarSoundStream = PlaySound(ESounds.ProgressBar, CConfig.SoundEffectVolume); // Schedule stop after duration and start Applause sound Task.Run(async () => @@ -302,15 +302,15 @@ namespace Vocaluxe.Screens // Play the appropriate applause sound based on maxPoints if (maxPoints >= 8000) { - _ApplauseStream = PlaySound(ESounds.ApplauseHigh, CConfig.GameMusicVolume); + _ApplauseStream = PlaySound(ESounds.ApplauseHigh, CConfig.SoundEffectVolume); } else if (maxPoints >= 5000) { - _ApplauseStream = PlaySound(ESounds.ApplauseMid, CConfig.GameMusicVolume); + _ApplauseStream = PlaySound(ESounds.ApplauseMid, CConfig.SoundEffectVolume); } else if (maxPoints >= 2000) { - _ApplauseStream = PlaySound(ESounds.ApplauseLow, CConfig.GameMusicVolume); + _ApplauseStream = PlaySound(ESounds.ApplauseLow, CConfig.SoundEffectVolume); } }