Class WaveStream
Base class for all WaveStream classes. Derives from stream.
Implements
Namespace: pdftron.PDF.Tools
Assembly: pdftron.PDF.Tools.dll
Syntax
public abstract class WaveStream : Stream, IWaveProvider
Properties
BlockAlign
The block alignment for this wavestream. Do not modify the Position to anything that is not a whole multiple of this value
Declaration
public virtual int BlockAlign { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CanRead
We can read from this stream
Declaration
public override bool CanRead { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanSeek
We can seek within this stream
Declaration
public override bool CanSeek { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanWrite
We can't write to this stream
Declaration
public override bool CanWrite { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CurrentTime
The current position in the stream in Time format
Declaration
public virtual TimeSpan CurrentTime { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
TotalTime
Total length in real-time of the stream (may be an estimate for compressed files)
Declaration
public virtual TimeSpan TotalTime { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
WaveFormat
Retrieves the WaveFormat for this stream
Declaration
public abstract WaveFormat WaveFormat { get; }
Property Value
Type | Description |
---|---|
WaveFormat |
Methods
Flush()
Flush does not need to do anything
See
Declaration
public override void Flush()
HasData(Int32)
Whether the WaveStream has non-zero sample data at the current position for the specified count
Declaration
public virtual bool HasData(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Number of bytes to read |
Returns
Type | Description |
---|---|
System.Boolean |
Seek(Int64, SeekOrigin)
An alternative way of repositioning.
See
Declaration
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | offset | |
SeekOrigin | origin |
Returns
Type | Description |
---|---|
System.Int64 |
SetLength(Int64)
Sets the length of the WaveStream. Not Supported.
Declaration
public override void SetLength(long length)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | length |
Skip(Int32)
Moves forward or backwards the specified number of seconds in the stream
Declaration
public void Skip(int seconds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | seconds | Number of seconds to move, can be negative |
Write(Byte[], Int32, Int32)
Writes to the WaveStream. Not Supported.
Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.Int32 | count |