public abstract Seek ( long sampleOffset ) : void | ||
sampleOffset | long | The index of the sample to jump to, relative to the beginning. |
return | void |
/// <summary> /// Change the current playing position in the stream source. /// </summary> /// <param name="time">Seek to specified time.</param> protected override void OnSeek(TimeSpan time) { lock (_mutex) _reader.Seek((long)time.TotalSeconds * SampleRate * ChannelCount); }
/// <summary> /// Sets the current read position within current decoder. /// </summary> /// <param name="sampleOffset">The index of the sample to jump to, relative to the beginning.</param> public void Seek(long sampleOffset) { reader?.Seek(SampleOffset = Math.Min(sampleOffset, SampleCount)); }