WaveStream that simply passes on data from its source stream (e.g. a MemoryStream)
More...
|
| RawSourceWaveStream (Stream sourceStream, WaveFormat waveFormat) |
| Initialises a new instance of RawSourceWaveStream.
|
|
| RawSourceWaveStream (byte[] byteStream, int offset, int count, WaveFormat waveFormat) |
| Initialises a new instance of RawSourceWaveStream.
|
|
override int | Read (byte[] buffer, int offset, int count) |
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
override void | Flush () |
| Flushes the buffer of the current stream and causes any buffered data to be written to the underlying device.
|
|
override long | Seek (long offset, SeekOrigin origin) |
| Sets the position within the current stream.
|
|
override void | SetLength (long length) |
| Throws a NotSupportedException with the message "Can't set length of a WaveFormatString".
|
|
override void | Write (byte[] buffer, int offset, int count) |
| Throws a NotSupportedException with the message "Can't write to a WaveFormatString".
|
|
void | Skip (int seconds) |
| Skips the playback to a new position in the audio file based on the specified number of seconds.
|
|
virtual bool | HasData (int count) |
| Checks if there is data available at the current position.
|
|
|
override WaveFormat | WaveFormat [get] |
| The WaveFormat of this stream.
|
|
override long | Length [get] |
| The length in bytes of this stream (if supported)
|
|
override long | Position [get, set] |
| The current position in this stream.
|
|
WaveFormat | WaveFormat [get] |
| Retrieves the WaveFormat for this stream.
|
|
override bool | CanRead [get] |
| We can read from this stream.
|
|
override bool | CanSeek [get] |
| We can seek within this stream.
|
|
override bool | CanWrite [get] |
| We can't write to this stream.
|
|
virtual int | BlockAlign [get] |
| The block alignment for this wavestream. Do not modify the Position to anything that is not a whole multiple of this value.
|
|
virtual TimeSpan | CurrentTime [get, set] |
| The current position in the stream in Time format.
|
|
virtual TimeSpan | TotalTime [get] |
| Total length in real-time of the stream (may be an estimate for compressed files)
|
|
WaveStream that simply passes on data from its source stream (e.g. a MemoryStream)
◆ RawSourceWaveStream() [1/2]
NAudio.Wave.RawSourceWaveStream.RawSourceWaveStream |
( |
Stream | sourceStream, |
|
|
WaveFormat | waveFormat ) |
|
inline |
Initialises a new instance of RawSourceWaveStream.
- Parameters
-
sourceStream | The source stream containing raw audio |
waveFormat | The waveformat of the audio in the source stream |
◆ RawSourceWaveStream() [2/2]
NAudio.Wave.RawSourceWaveStream.RawSourceWaveStream |
( |
byte[] | byteStream, |
|
|
int | offset, |
|
|
int | count, |
|
|
WaveFormat | waveFormat ) |
|
inline |
Initialises a new instance of RawSourceWaveStream.
- Parameters
-
byteStream | The buffer containing raw audio |
offset | Offset in the source buffer to read from |
count | Number of bytes to read in the buffer |
waveFormat | The waveformat of the audio in the source stream |
◆ Read()
override int NAudio.Wave.RawSourceWaveStream.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
- Parameters
-
buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | The maximum number of bytes to be read from the current stream. |
- Returns
- The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream is reached before any bytes are read.
- Exceptions
-
EndOfStreamException | The end of the stream is reached. |
Implements NAudio.Wave.IWaveProvider.
◆ sourceStream
readonly Stream NAudio.Wave.RawSourceWaveStream.sourceStream |
|
private |
◆ waveFormat
readonly WaveFormat NAudio.Wave.RawSourceWaveStream.waveFormat |
|
private |
◆ Length
override long NAudio.Wave.RawSourceWaveStream.Length |
|
get |
The length in bytes of this stream (if supported)
◆ Position
override long NAudio.Wave.RawSourceWaveStream.Position |
|
getset |
The current position in this stream.
◆ WaveFormat
override WaveFormat NAudio.Wave.RawSourceWaveStream.WaveFormat |
|
get |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Wave/WaveStreams/RawSourceWaveStream.cs