Seek() public abstract method

Sets the current read position of the sample offset.
public abstract Seek ( long sampleOffset ) : void
sampleOffset long The index of the sample to jump to, relative to the beginning.
return void
Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <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));
 }