Fix repeating of bg-music.
This commit is contained in:
1 parent
942c8dca27
commit
46544aee82
3 files changed
+7
-4
No files matched your search
@@ -475,8 +475,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
_PreviewNrInternal = -1;
|
||||
|
||||
CBase.BackgroundMusic.StopPreview();
|
||||
|
||||
CSong song = CBase.Songs.GetVisibleSong(nr);
|
||||
if (song == null)
|
||||
return;
|
||||
|
||||
@@ -162,6 +162,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
}
|
||||
base.TogglePause();
|
||||
}
|
||||
|
||||
|
||||
private void _LoadVideo()
|
||||
{
|
||||
|
||||
@@ -48,9 +48,9 @@ namespace VocaluxeLib.Utils.Player
|
||||
}
|
||||
|
||||
public bool RepeatSong;
|
||||
public bool IsPlaying { get; private set; }
|
||||
public bool IsPlaying { get; protected set; }
|
||||
|
||||
public bool IsFinished { get { return CBase.Sound.IsFinished(_StreamID); } }
|
||||
public bool IsFinished { get { return RepeatSong ? false : CBase.Sound.IsFinished(_StreamID); } }
|
||||
|
||||
public CSoundPlayer(bool loop = false)
|
||||
{
|
||||
@@ -131,7 +131,11 @@ namespace VocaluxeLib.Utils.Player
|
||||
if (timeToPlay <= _FadeTime || finished)
|
||||
{
|
||||
if (RepeatSong)
|
||||
{
|
||||
//Set to false for restarting
|
||||
IsPlaying = false;
|
||||
Play();
|
||||
}
|
||||
else
|
||||
Stop();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user