Fix video sync.

This commit is contained in:
Florian Küpper committed 2014-08-22 18:05:50 +02:00
1 parent 6f617aa40b
commit f926263706
2 files changed
+21

No files matched your search

+18
View File
@@ -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)