diff --git a/Output/BackgroundMusic/background track license.txt b/Output/BackgroundMusic/background track license.txt new file mode 100644 index 00000000..2395341c --- /dev/null +++ b/Output/BackgroundMusic/background track license.txt @@ -0,0 +1,10 @@ +This work is licensed under the Creative Commons license by-sa 3.0. +(http://creativecommons.org/licenses/by-sa/3.0/) + +Author: +DJad (http://www.jamendo.com/de/artist/DJad) + +Distributed by: +Site: jamendo.com +File: DJad - Walking Alone.mp3 +URL: http://www.jamendo.com/de/track/543970 diff --git a/Output/BackgroundMusic/background track.mp3 b/Output/BackgroundMusic/background track.mp3 new file mode 100644 index 00000000..f32135fc Binary files /dev/null and b/Output/BackgroundMusic/background track.mp3 differ diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 0fc27904..be0b28c6 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -84,6 +84,10 @@ Normal Erweitert + + Eigene Musik und Hintergrundmusik + Keine eigene Musik + Nur eigene Musik Laden @@ -159,6 +163,9 @@ Verzögerungs-Test Soundeinstellungen + Hintergrundmusik + Hintergrundmusiklautstärke + Hintergrundmusikquelle Designeinstellungen Design diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 11ca103c..25d2537b 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -84,6 +84,10 @@ Normal Expanded + + Own Music and Background Music + No own Musik + Only own Musik Loading @@ -159,6 +163,9 @@ Delay Test Options Sound + Backgroundmusic + Backgroundmusic Volume + Backgroundmusic Source Theme Options Theme diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index 169aa556..fd473b6a 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -84,6 +84,10 @@ Normal Développé + + TODO: Own Music and Background Music + TODO: No own Musik + TODO: Only own Musik Chargement @@ -159,6 +163,9 @@ Test du Retard Options du Son + TODO: Backgroundmusic + TODO: Backgroundmusic Volume + TODO: Backgroundmusic Source Options du Thème Thème diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml b/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml index 5f01cd24..018a2e36 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml @@ -62,5 +62,337 @@ + + + 75 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + + + Normal + + TR_SCREENOSOUND_BACKGROUNDMUSIC + + + + + + + 75 + 165 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + + + Normal + + TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME + + + + + + + 75 + 225 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + + + Normal + + TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE + + + + + + + Button + + Button + + 145 + 600 + 0,00 + 150 + 50 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 32 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + + + Normal + + TR_BUTTON_BACK + + + + + + 10 + 26 + + + + + + 10 + 26 + + + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 100 + 0,00 + 700 + 50 + + 505 + 105 + 0,00 + 40 + 40 + + 1170 + 105 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 205,33 + + Normal + + Bold + + 3 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 160 + 0,00 + 700 + 50 + + 505 + 165 + 0,00 + 40 + 40 + + 1170 + 165 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 205,33 + + Normal + + Bold + + 3 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 220 + 0,00 + 700 + 50 + + 505 + 225 + 0,00 + 40 + 40 + + 1170 + 225 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 205,33 + + Normal + + Bold + + 3 + \ No newline at end of file diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs new file mode 100644 index 00000000..374d8d5b --- /dev/null +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; + +using Vocaluxe.Base; +using System.Diagnostics; +using Vocaluxe.Lib.Song; + +namespace Vocaluxe.Base +{ + static class CBackgroundMusic + { + private static CHelper Helper = new CHelper(); + private static int _CurrentMusicStream = -1; + private static bool _Fading; + private static Stopwatch _FadeTimer = new Stopwatch(); + private static Random _Random = new Random(); + private static List _BackgroundMusicFileNames = new List(); + private static int _CurrentBackgroundMusicFileNameIndex; + private static bool _OwnMusicAdded; + private static bool _BackgroundMusicAdded; + + public static void Init() + { + if(CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC || CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_OWN_MUSIC) + AddBackgroundMusic(); + } + + public static void Play() + { + if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) + { + if (_BackgroundMusicFileNames.Count > 0) + { + CSound.Fade(_CurrentMusicStream, CConfig.BackgroundMusicVolume, CConfig.FadeTime); + CSound.Play(_CurrentMusicStream); + } + } + } + + public static void Stop() + { + if (_BackgroundMusicFileNames.Count > 0) + CSound.FadeAndStop(_CurrentMusicStream, CConfig.BackgroundMusicVolume, CConfig.FadeTime); + } + + public static void Pause() + { + if (_BackgroundMusicFileNames.Count > 0) + CSound.FadeAndPause(_CurrentMusicStream, 0, CConfig.FadeTime); + } + + public static void Update() + { + if (_BackgroundMusicFileNames.Count > 0) + { + float timeToPlay = CSound.GetLength(_CurrentMusicStream) - CSound.GetPosition(_CurrentMusicStream); + if (_FadeTimer.ElapsedMilliseconds >= CConfig.FadeTime * 1000) + { + _Fading = false; + _FadeTimer.Reset(); + } + if ((timeToPlay <= CConfig.FadeTime) && !_Fading) + { + _FadeTimer.Start(); + Next(); + _Fading = true; + } + } + } + + public static void Next() + { + if (_BackgroundMusicFileNames.Count > 0) + { + if (_CurrentMusicStream != -1) + CSound.FadeAndStop(_CurrentMusicStream, 0, CConfig.FadeTime); + _CurrentBackgroundMusicFileNameIndex = _Random.Next(_BackgroundMusicFileNames.Count); + _CurrentMusicStream = CSound.Load(_BackgroundMusicFileNames[_CurrentBackgroundMusicFileNameIndex]); + Play(); + } + else if (_BackgroundMusicAdded || _OwnMusicAdded) + { + if (_CurrentMusicStream != -1) + CSound.FadeAndStop(_CurrentMusicStream, 0, CConfig.FadeTime); + } + } + + public static void ApplyVolume() + { + CSound.Fade(_CurrentMusicStream, CConfig.BackgroundMusicVolume, CConfig.FadeTime); + } + + public static void AddOwnMusic() + { + if (!_OwnMusicAdded) + { + foreach (CSong song in CSongs.AllSongs) + { + _BackgroundMusicFileNames.Add(song.GetMP3()); + } + } + _OwnMusicAdded = true; + Next(); + } + + public static void RemoveOwnMusic() + { + foreach (CSong song in CSongs.AllSongs) + { + _BackgroundMusicFileNames.Remove(song.GetMP3()); + } + _OwnMusicAdded = false; + } + + public static void AddBackgroundMusic() + { + if (!_BackgroundMusicAdded) + { + _BackgroundMusicFileNames.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.mp3", true, true)); + _BackgroundMusicFileNames.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wav", true, true)); + _BackgroundMusicFileNames.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.ogg", true, true)); + _BackgroundMusicFileNames.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wma", true, true)); + _BackgroundMusicAdded = true; + Next(); + } + } + + public static void RemoveBackgroundMusic() + { + if (_BackgroundMusicAdded) + { + List removeList = new List(); + removeList.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.mp3", true, true)); + removeList.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wav", true, true)); + removeList.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.ogg", true, true)); + removeList.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wma", true, true)); + + foreach (string s in removeList) + { + _BackgroundMusicFileNames.Remove(s); + } + _BackgroundMusicAdded = false; + } + } + } +} diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 281752e2..2854b90a 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -134,6 +134,14 @@ namespace Vocaluxe.Base TR_CONFIG_TIMERLOOK_NORMAL, TR_CONFIG_TIMERLOOK_EXPANDED } + + public enum EBackgroundMusicSource + { + TR_CONFIG_NO_OWN_MUSIC, + TR_CONFIG_ONLY_OWN_MUSIC, + TR_CONFIG_OWN_MUSIC + } + #endregion Enums static class CConfig @@ -173,6 +181,9 @@ namespace Vocaluxe.Base public static EPlaybackLib PlayBackLib = EPlaybackLib.PortAudio; public static ERecordLib RecordLib = ERecordLib.PortAudio; public static uint PortAudioBufferSize = 1024; + public static int BackgroundMusicVolume = 50; + public static EOffOn BackgroundMusic = EOffOn.TR_CONFIG_ON; + public static EBackgroundMusicSource BackgroundMusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC; // Game public static List SongFolder = new List(); @@ -282,6 +293,9 @@ namespace Vocaluxe.Base #region Sound CHelper.TryGetEnumValueFromXML("//root/Sound/PlayBackLib", navigator, ref PlayBackLib); CHelper.TryGetEnumValueFromXML("//root/Sound/RecordLib", navigator, ref RecordLib); + CHelper.TryGetEnumValueFromXML("//root/Sound/BackgroundMusic", navigator, ref BackgroundMusic); + CHelper.TryGetIntValueFromXML("//root/Sound/BackgroundMusicVolume", navigator, ref BackgroundMusicVolume); + CHelper.TryGetEnumValueFromXML("//root/Sound/BackgroundMusicSource", navigator, ref BackgroundMusicSource); #endregion Sound #region Game @@ -473,6 +487,15 @@ namespace Vocaluxe.Base writer.WriteComment("RecordLib: " + ListStrings(Enum.GetNames(typeof(ERecordLib)))); writer.WriteElementString("RecordLib", Enum.GetName(typeof(ERecordLib), RecordLib)); + writer.WriteComment("Background Music"); + writer.WriteElementString("BackgroundMusicEnabled", Enum.GetName(typeof(EOffOn), BackgroundMusic)); + + writer.WriteComment("Background Music Volume from 0 to 100"); + writer.WriteElementString("BackgroundMusicVolume", BackgroundMusicVolume.ToString()); + + writer.WriteComment("Background Music Source"); + writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource)); + writer.WriteEndElement(); #endregion Sound diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 10458c7a..a209f1a7 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -71,6 +71,7 @@ namespace Vocaluxe.Base public const string sFolderSounds = "Sounds"; public const string sFolderLanguages = "Languages"; public const string sFolderScreenshots = "Screenshots"; + public const string sFolderBackgroundMusic = "BackgroundMusic"; //public const String[] ToneStrings = new String[]{ "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; public const int ToneMin = -36; diff --git a/Vocaluxe/Lib/Sound/COpenALPlay.cs b/Vocaluxe/Lib/Sound/COpenALPlay.cs index 92d07951..99215d7a 100644 --- a/Vocaluxe/Lib/Sound/COpenALPlay.cs +++ b/Vocaluxe/Lib/Sound/COpenALPlay.cs @@ -146,6 +146,7 @@ namespace Vocaluxe.Lib.Sound { if (AlreadyAdded(Stream)) { + _Decoder[GetStreamIndex(Stream)].Loop = Loop; _Decoder[GetStreamIndex(Stream)].Play(); } } diff --git a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs index b2814f0e..d39c6942 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs +++ b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs @@ -130,6 +130,7 @@ namespace Vocaluxe.Lib.Sound { if (AlreadyAdded(Stream)) { + _Decoder[GetStreamIndex(Stream)].Loop = Loop; _Decoder[GetStreamIndex(Stream)].Play(); } } diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index e08c7cd7..cc05de5b 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -292,6 +292,7 @@ namespace Vocaluxe.Menu Keys.CopyEvents(); CSound.Update(); + CBackgroundMusic.Update(); if (CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC && ActualScreen != EScreens.ScreenSing) CSongs.LoadCover(30L); diff --git a/Vocaluxe/Menu/CMenu.cs b/Vocaluxe/Menu/CMenu.cs index 96748d60..282fb865 100644 --- a/Vocaluxe/Menu/CMenu.cs +++ b/Vocaluxe/Menu/CMenu.cs @@ -109,6 +109,7 @@ namespace Vocaluxe.Menu _ThemeLyrics = null; _ThemeSelectSlides = null; _ThemeSingNotes = null; + } #region ThemeHandler public virtual void LoadTheme() @@ -861,11 +862,13 @@ namespace Vocaluxe.Menu { ResumeBG(); _Active = true; + CBackgroundMusic.Play(); } public virtual void OnClose() { PauseBG(); + CBackgroundMusic.Pause(); } #endregion MenuHandler diff --git a/Vocaluxe/Program.cs b/Vocaluxe/Program.cs index 0f457b11..0a8015dd 100644 --- a/Vocaluxe/Program.cs +++ b/Vocaluxe/Program.cs @@ -82,6 +82,13 @@ namespace Vocaluxe Application.DoEvents(); + // Init Background Music + CLog.StartBenchmark(0, "Init Background Music"); + CBackgroundMusic.Init(); + CLog.StopBenchmark(0, "Init Background Music"); + + Application.DoEvents(); + // Init Profiles CLog.StartBenchmark(0, "Init Profiles"); CProfiles.Init(); diff --git a/Vocaluxe/Screens/CScreenLoad.cs b/Vocaluxe/Screens/CScreenLoad.cs index c147601a..5c1723e8 100644 --- a/Vocaluxe/Screens/CScreenLoad.cs +++ b/Vocaluxe/Screens/CScreenLoad.cs @@ -190,6 +190,8 @@ namespace Vocaluxe.Screens _Intros[2].Close(); CLog.StopBenchmark(3, "Load Cover"); + if(CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC || CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_OWN_MUSIC) + CBackgroundMusic.AddOwnMusic(); } private void CheckStartIntroVideos() diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index 0aa1e577..4426b7af 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -353,6 +353,12 @@ namespace Vocaluxe.Screens _DelaySound = -1; } + public override void OnShowFinish() + { + base.OnShowFinish(); + CBackgroundMusic.Pause(); + } + public override bool Draw() { DrawBG(); diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index c41c16a9..919f4c40 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -14,6 +14,15 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! const int ScreenVersion = 1; + private const string SelectSlideBackgroundMusic = "SelectSlideBackgroundMusic"; + private const string SelectSlideBackgroundMusicVolume = "SelectSlideBackgroundMusicVolume"; + private const string SelectSlideBackgroundMusicSource = "SelectSlideBackgroundMusicSource"; + + private const string ButtonExit = "ButtonExit"; + + private int _BackgroundMusicVolume; + private EOffOn _BackgroundMusic; + public CScreenOptionsSound() { Init(); @@ -25,6 +34,19 @@ namespace Vocaluxe.Screens _ThemeName = "ScreenOptionsSound"; _ScreenVersion = ScreenVersion; + + _ThemeButtons = new string[] { ButtonExit }; + _ThemeSelectSlides = new string[] { SelectSlideBackgroundMusic, SelectSlideBackgroundMusicVolume, SelectSlideBackgroundMusicSource }; + } + + public override void LoadTheme() + { + base.LoadTheme(); + SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].SetValues((int)CConfig.BackgroundMusic); + SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].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[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5; + SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].SetValues((int)CConfig.BackgroundMusicSource); + SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection = (int)CConfig.BackgroundMusicSource; } public override bool HandleInput(KeyEvent KeyEvent) @@ -41,6 +63,7 @@ namespace Vocaluxe.Screens { case Keys.Escape: case Keys.Back: + SaveConfig(); CGraphics.FadeTo(EScreens.ScreenOptions); break; @@ -49,7 +72,19 @@ namespace Vocaluxe.Screens break; case Keys.Enter: - CGraphics.FadeTo(EScreens.ScreenTest); + if (Buttons[htButtons(ButtonExit)].Selected) + { + SaveConfig(); + CGraphics.FadeTo(EScreens.ScreenOptions); + } + break; + + case Keys.Left: + SaveConfig(); + break; + + case Keys.Right: + SaveConfig(); break; } } @@ -62,8 +97,17 @@ namespace Vocaluxe.Screens if (MouseEvent.RB) { + SaveConfig(); CGraphics.FadeTo(EScreens.ScreenOptions); } + if (MouseEvent.LB && IsMouseOver(MouseEvent)) + { + SaveConfig(); + if (Buttons[htButtons(ButtonExit)].Selected) + { + CGraphics.FadeTo(EScreens.ScreenOptions); + } + } return true; } @@ -77,5 +121,44 @@ namespace Vocaluxe.Screens base.Draw(); return true; } + + public override void OnShow() + { + base.OnShow(); + _BackgroundMusic = CConfig.BackgroundMusic; + _BackgroundMusicVolume = CConfig.BackgroundMusicVolume; + } + 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(); + + if (CConfig.BackgroundMusicSource != (EBackgroundMusicSource)SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection) + { + CConfig.BackgroundMusicSource = (EBackgroundMusicSource)SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection; + if (CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC) + { + CBackgroundMusic.RemoveOwnMusic(); + CBackgroundMusic.AddBackgroundMusic(); + } + if (CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC) + { + CBackgroundMusic.RemoveBackgroundMusic(); + CBackgroundMusic.AddOwnMusic(); + } + if (CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_OWN_MUSIC) + CBackgroundMusic.AddOwnMusic(); + + } + + CConfig.SaveConfig(); + } } } diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index be9483bc..4681a79b 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -326,6 +326,7 @@ namespace Vocaluxe.Screens } SetVisuability(); + CBackgroundMusic.Pause(); } public override void OnShowFinish() @@ -334,6 +335,7 @@ namespace Vocaluxe.Screens CGame.Start(); LoadNextSong(); + CBackgroundMusic.Pause(); } public override bool Draw() diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index f6f95ec8..abc609de 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -171,9 +171,15 @@ namespace Vocaluxe.Screens int song = SongMenus[htSongMenus(SongMenu)].GetActualSelection(); if ((CSongs.Category >= 0) && (song >= 0) && song < CSongs.VisibleSongs.Length) + { Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title; + CBackgroundMusic.Pause(); + } else if ((CSongs.Category == -1) && (song >= 0) && song < CSongs.Categories.Length) + { Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name; + CBackgroundMusic.Play(); + } else Texts[htTexts(TextSelection)].Text = String.Empty; diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 710a93d4..d10dac28 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -89,6 +89,7 @@ +