Fix repeating of bg-music.

This commit is contained in:
Florian Küpper committed 2014-08-24 17:38:37 +02:00
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;
+1
View File
@@ -162,6 +162,7 @@ namespace VocaluxeLib.Utils.Player
}
base.TogglePause();
}
private void _LoadVideo()
{
+6 -2
View File
@@ -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();
}