diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index ba8866bf..20203e29 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -31,22 +31,14 @@ namespace Vocaluxe.Base public static void Init() { - foreach(string path in Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.mp3", true, true)) + List templist = new List(); + + foreach(string ending in CSettings.MusicFileTypes) { - _BGMusicFileNames.Add(new PlaylistElement(path)); + templist.AddRange(Helper.ListFiles(CSettings.sFolderBackgroundMusic, ending, true, true)); } - foreach(string path in Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.ogg", true, true)) - { - _BGMusicFileNames.Add(new PlaylistElement(path)); - } - - foreach(string path in Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wma", true, true)) - { - _BGMusicFileNames.Add(new PlaylistElement(path)); - } - - foreach(string path in Helper.ListFiles(CSettings.sFolderBackgroundMusic, "*.wav", true, true)) + foreach (string path in templist) { _BGMusicFileNames.Add(new PlaylistElement(path)); } diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index bbd6164f..24ffda63 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -111,6 +111,11 @@ namespace Vocaluxe.Base public static bool TabNavigation = false; public const float BackgroundMusicFadeTime = 0.5f; + + public static List MusicFileTypes = new List() + { + "*.mp3","*.wma","*.ogg","*.wav" + }; public static string GetVersionText() {