private void SetPosition(long value) { if (CanSeek) { lock (_lockObj) { long hnsPos = (10000000L * value) / WaveFormat.BytesPerSecond; var propertyVariant = PropertyVariant.CreateLong(hnsPos); _reader.SetCurrentPosition(Guid.Empty, propertyVariant); _decoderBufferCount = 0; _decoderBufferOffset = 0; _position = value; } } }
private void SetPosition(long value) { if (CanSeek) { lock (_lockObj) { long hnsPos = (10000000L * value) / WaveFormat.BytesPerSecond; var propertyVariant = new PropertyVariant { HValue = hnsPos, DataType = VarEnum.VT_I8 }; _reader.SetCurrentPosition(Guid.Empty, propertyVariant); _decoderBufferCount = 0; _decoderBufferOffset = 0; _position = value; } } }
private void SetPosition(long value) { if (CanSeek) { lock (_lockObj) { long hnsPos = SamplesToNanoSecond100Units(value); var propertyVariant = new PropertyVariant { HValue = hnsPos, DataType = VarEnum.VT_I8 }; _reader.SetCurrentPosition(Guid.Empty, propertyVariant); _decoderBufferCount = 0; _decoderBufferOffset = 0; _position = value; _positionChanged = true; } } }