ArtofKinect.Common.SoundPlayer.Seek C# (CSharp) Method

Seek() public method

public Seek ( System.TimeSpan offset ) : void
offset System.TimeSpan
return void
        public void Seek(TimeSpan offset)
        {
            if (wavStream == null)
                return;
            wavStream.CurrentTime = offset;
        }

Usage Example

        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();
        }
All Usage Examples Of ArtofKinect.Common.SoundPlayer::Seek