Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into PartyNames

This commit is contained in:
Florian Küpper committed 2013-12-26 11:21:23 +01:00
commit 2427f40bc6
7 files changed
+20 -115293

No files matched your search

+14 -11
View File
@@ -198,18 +198,21 @@ namespace VocaluxeLib.Menu.SongMenu
private void UpdateLength(CSong song)
{
float time = CBase.Sound.GetLength(_PreviewSongStream);
if (Math.Abs(song.Finish) > 0.001)
time = song.Finish;
// The audiobackend is not yet ready to return the length
if (time > 0)
if (song != null)
{
time -= song.Start;
var min = (int)Math.Floor(time / 60f);
var sec = (int)(time - min * 60f);
_SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
_Length = time;
float time = CBase.Sound.GetLength(_PreviewSongStream);
if (Math.Abs(song.Finish) > 0.001)
time = song.Finish;
// The audiobackend is not yet ready to return the length
if (time > 0)
{
time -= song.Start;
var min = (int)Math.Floor(time / 60f);
var sec = (int)(time - min * 60f);
_SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
_Length = time;
}
}
}