Ejemplo n.º 1
0
 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;
         }
     }
 }
Ejemplo n.º 2
0
 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;
         }
     }
 }
Ejemplo n.º 3
0
        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;
                }
            }
        }