Base class for all WaveStream classes. Derives from stream.
More...
|
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.
|
|
int | Read (byte[] buffer, int offset, int count) |
| Fill the specified buffer with wave data.
|
|
|
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)
|
|
Base class for all WaveStream classes. Derives from stream.
◆ Flush()
override void NAudio.Wave.WaveStream.Flush |
( |
| ) |
|
|
inline |
Flushes the buffer of the current stream and causes any buffered data to be written to the underlying device.
◆ HasData()
virtual bool NAudio.Wave.WaveStream.HasData |
( |
int | count | ) |
|
|
inlinevirtual |
Checks if there is data available at the current position.
- Parameters
-
count | The number of data items to check for. |
- Returns
- True if there is data available within the specified count; otherwise, false.
Reimplemented in NAudio.Wave.WaveChannel32, and NAudio.Wave.WaveOffsetStream.
◆ Seek()
override long NAudio.Wave.WaveStream.Seek |
( |
long | offset, |
|
|
SeekOrigin | origin ) |
|
inline |
Sets the position within the current stream.
- Parameters
-
offset | A byte offset relative to the origin parameter. |
origin | A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. |
- Returns
- The new position within the current stream.
- Exceptions
-
System.IO.IOException | An I/O error occurs. |
◆ SetLength()
override void NAudio.Wave.WaveStream.SetLength |
( |
long | length | ) |
|
|
inline |
Throws a NotSupportedException with the message "Can't set length of a WaveFormatString".
- Parameters
-
length | The length to be set. |
- Exceptions
-
NotSupportedException | Thrown when attempting to set the length of a WaveFormatString. |
◆ Skip()
void NAudio.Wave.WaveStream.Skip |
( |
int | seconds | ) |
|
|
inline |
Skips the playback to a new position in the audio file based on the specified number of seconds.
- Parameters
-
seconds | The number of seconds to skip the playback by. |
This method calculates the new position in the audio file based on the current position and the specified number of seconds to skip. If the new position exceeds the length of the audio file, the playback position is set to the end of the file. If the new position is negative, the playback position is set to the beginning of the file. Otherwise, the playback position is set to the calculated new position.
◆ Write()
override void NAudio.Wave.WaveStream.Write |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Throws a NotSupportedException with the message "Can't write to a WaveFormatString".
- Parameters
-
buffer | The buffer to write data from. |
offset | The zero-based byte offset in buffer at which to begin writing bytes. |
count | The maximum number of bytes to write. |
- Exceptions
-
NotSupportedException | Thrown when attempting to write to a WaveFormatString. |
◆ BlockAlign
virtual int NAudio.Wave.WaveStream.BlockAlign |
|
get |
The block alignment for this wavestream. Do not modify the Position to anything that is not a whole multiple of this value.
◆ CanRead
override bool NAudio.Wave.WaveStream.CanRead |
|
get |
We can read from this stream.
◆ CanSeek
override bool NAudio.Wave.WaveStream.CanSeek |
|
get |
We can seek within this stream.
◆ CanWrite
override bool NAudio.Wave.WaveStream.CanWrite |
|
get |
We can't write to this stream.
◆ CurrentTime
virtual TimeSpan NAudio.Wave.WaveStream.CurrentTime |
|
getset |
The current position in the stream in Time format.
◆ TotalTime
virtual TimeSpan NAudio.Wave.WaveStream.TotalTime |
|
get |
Total length in real-time of the stream (may be an estimate for compressed files)
◆ WaveFormat
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/WaveStream.cs