public void Play() { if (Status == PointCloudPlayerStatus.NotLoaded) { return; } if (Status != PointCloudPlayerStatus.Playing) { var playOffset = CurrentTimeUTC - MinTimeUTC; _playbackStartUTC = DateTime.Now - playOffset; _soundPlayer.Seek(playOffset); } Status = PointCloudPlayerStatus.Playing; _soundPlayer.Play(); }
public void Seek(int frameNumber) { if (frameNumber < 0 || frameNumber > MaxFrameIndex) { throw new ArgumentOutOfRangeException("frameNumber"); } if (Status == PointCloudPlayerStatus.Playing) { //TODO recalculate _playbackStartUTC } //TODO: intelligently reset buffer _bufferedFrames.Clear(); _nextFrameToLoadIndex = frameNumber; CurrentFrameIndex = frameNumber; MotionFrameHeader header = _serializer.LoadHeader(_filesToLoad[frameNumber]); var timeOffset = header.TimeUTC - MinTimeUTC; _soundPlayer.Seek(timeOffset); }