Fix for background-music-files.
This commit is contained in:
1 parent
3612b9244b
commit
240f47090d
2 files changed
+25
-5
No files matched your search
@@ -270,11 +270,16 @@ namespace Vocaluxe.Base
|
|||||||
_SongPlayer.Play();
|
_SongPlayer.Play();
|
||||||
|
|
||||||
//otherwhise load
|
//otherwhise load
|
||||||
//Seek to #Start-Tag, if found
|
if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
|
||||||
float start = 0f;
|
_SongPlayer.Load(_CurrentPlaylistElement.MusicFilePath, 0f, true);
|
||||||
if (_CurrentPlaylistElement.Start > 0.001 && CConfig.BackgroundMusicUseStart == EOffOn.TR_CONFIG_ON)
|
else
|
||||||
start = _CurrentPlaylistElement.Start;
|
{
|
||||||
_SongPlayer.Load(CBase.Songs.GetSongByID(_CurrentPlaylistElement.SongID), start, true);
|
//Seek to #Start-Tag, if found
|
||||||
|
float start = 0f;
|
||||||
|
if (_CurrentPlaylistElement.Start > 0.001 && CConfig.BackgroundMusicUseStart == EOffOn.TR_CONFIG_ON)
|
||||||
|
start = _CurrentPlaylistElement.Start;
|
||||||
|
_SongPlayer.Load(CBase.Songs.GetSongByID(_CurrentPlaylistElement.SongID), start, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void _AddOwnMusic()
|
private static void _AddOwnMusic()
|
||||||
|
|||||||
@@ -76,6 +76,12 @@ namespace VocaluxeLib.Utils.Player
|
|||||||
_LoadVideo();
|
_LoadVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CSongPlayer(string file, bool loop = false, float position = 0f, bool autoplay = false)
|
||||||
|
: base(file, loop, position, autoplay)
|
||||||
|
{
|
||||||
|
_Song = null;
|
||||||
|
}
|
||||||
|
|
||||||
public CTexture GetVideoTexture()
|
public CTexture GetVideoTexture()
|
||||||
{
|
{
|
||||||
if (_Video == -1 || _Song == null)
|
if (_Video == -1 || _Song == null)
|
||||||
@@ -105,6 +111,15 @@ namespace VocaluxeLib.Utils.Player
|
|||||||
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay);
|
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Load(string file, float position = 0f, bool autoplay = false)
|
||||||
|
{
|
||||||
|
if (String.IsNullOrEmpty(file))
|
||||||
|
return;
|
||||||
|
|
||||||
|
_Song = null;
|
||||||
|
base.Load(file, position, autoplay);
|
||||||
|
}
|
||||||
|
|
||||||
public new void Close()
|
public new void Close()
|
||||||
{
|
{
|
||||||
base.Close();
|
base.Close();
|
||||||
|
|||||||
Reference in new issue
Block a user