Fix preview start after song end
This commit is contained in:
1 parent
83b72604a9
commit
21f6213c1a
1 file changed
+4
-1
@@ -537,9 +537,12 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
CBase.Sound.SetStreamVolume(stream, 0f);
|
||||
|
||||
float startposition = song.PreviewStart;
|
||||
float length = CBase.Sound.GetLength(stream);
|
||||
|
||||
if (startposition < 0.001)
|
||||
startposition = CBase.Sound.GetLength(stream) / 4f;
|
||||
startposition = length / 4f;
|
||||
else if (startposition > length - 5f)
|
||||
startposition = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
||||
|
||||
if (startposition >= 0.5f)
|
||||
startposition -= 0.5f;
|
||||
|
||||
Reference in new issue
Block a user