Fix video sync.
This commit is contained in:
1 parent
6f617aa40b
commit
f926263706
2 files changed
+21
No files matched your search
@@ -320,6 +320,9 @@ namespace Vocaluxe.Base
|
||||
else if (startposition > length - 5f)
|
||||
startposition = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
||||
|
||||
if (startposition >= 0.5f)
|
||||
startposition -= 0.5f;
|
||||
|
||||
_PreviewPlayer.Position = startposition;
|
||||
|
||||
Play();
|
||||
|
||||
@@ -67,6 +67,24 @@ namespace VocaluxeLib.Utils.Player
|
||||
get { return _StreamID != -1; }
|
||||
}
|
||||
|
||||
public float Position
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_StreamID == -1)
|
||||
return -1;
|
||||
return CBase.Sound.GetPosition(_StreamID);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_StreamID == -1)
|
||||
return;
|
||||
CBase.Sound.SetPosition(_StreamID, value);
|
||||
CBase.Video.Skip(_Video, value, _Song.VideoGap);
|
||||
_StartPosition = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CSongPlayer(bool loop = false) : base(loop) { }
|
||||
|
||||
public CSongPlayer(CSong song, bool loop = false, float position = 0f, bool autoplay = false)
|
||||
|
||||
Reference in new issue
Block a user