stop bg music if there are no more files to play (after option change)

This commit is contained in:
Alexander Eckart committed 2012-02-22 16:34:09 +01:00
1 parent 3416122b73
commit 016565df90
1 file changed
+2 -4
+2 -4
View File
@@ -51,7 +51,6 @@ namespace Vocaluxe.Base
public static void Stop()
{
if (_AllFileNames.Count > 0)
CSound.FadeAndStop(_CurrentMusicStream, 0f, CSettings.BackgroundMusicFadeTime);
_CurrentMusicFilePath = String.Empty;
@@ -59,7 +58,6 @@ namespace Vocaluxe.Base
public static void Pause()
{
if (_AllFileNames.Count > 0)
CSound.FadeAndPause(_CurrentMusicStream, 0f, CSettings.BackgroundMusicFadeTime);
}
@@ -113,7 +111,7 @@ namespace Vocaluxe.Base
if (_BackgroundMusicAdded)
_AllFileNames.AddRange(_BGMusicFileNames);
if (IsPlaying() && !IsBackgroundFile(_CurrentMusicFilePath))
if (IsPlaying() && !IsBackgroundFile(_CurrentMusicFilePath) || _AllFileNames.Count == 0)
Next();
_OwnMusicAdded = false;
@@ -137,7 +135,7 @@ namespace Vocaluxe.Base
AddOwnMusic();
_BackgroundMusicAdded = false;
if (IsPlaying() && IsBackgroundFile(_CurrentMusicFilePath))
if (IsPlaying() && IsBackgroundFile(_CurrentMusicFilePath) || _AllFileNames.Count == 0)
Next();
}
}