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