Fix BackgroundMusic not starting (missing defaults)
This commit is contained in:
1 parent
154a06821a
commit
e9955597b2
1 file changed
+7
-4
@@ -136,16 +136,19 @@ namespace Vocaluxe.Base
|
|||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_Volume = CConfig.BackgroundMusicVolume;
|
|
||||||
_VideoEnabled = (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON);
|
|
||||||
SetMusicSource(CConfig.BackgroundMusicSource);
|
|
||||||
|
|
||||||
List<string> soundFiles = CHelper.ListSoundFiles(CSettings.FolderBackgroundMusic, true, true);
|
List<string> soundFiles = CHelper.ListSoundFiles(CSettings.FolderBackgroundMusic, true, true);
|
||||||
|
|
||||||
foreach (string path in soundFiles)
|
foreach (string path in soundFiles)
|
||||||
_BGMusicFiles.Add(new CPlaylistElement(path));
|
_BGMusicFiles.Add(new CPlaylistElement(path));
|
||||||
|
//Set a default to have a consistent starting point, use SetMusicSource afterwards
|
||||||
|
_MusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC;
|
||||||
|
_AddBackgroundMusic();
|
||||||
|
|
||||||
|
_PreviousMusicIndex = -1;
|
||||||
IsPlaying = false;
|
IsPlaying = false;
|
||||||
|
_Volume = CConfig.BackgroundMusicVolume;
|
||||||
|
_VideoEnabled = (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON);
|
||||||
|
SetMusicSource(CConfig.BackgroundMusicSource);
|
||||||
_Initialized = true;
|
_Initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user