Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.WaveStream Class Referenceabstract

Base class for all WaveStream classes. Derives from stream. More...

Inheritance diagram for NAudio.Wave.WaveStream:
Collaboration diagram for NAudio.Wave.WaveStream:

Public Member Functions

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.
 
- Public Member Functions inherited from NAudio.Wave.IWaveProvider
int Read (byte[] buffer, int offset, int count)
 Fill the specified buffer with wave data.
 

Properties

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)
 
- Properties inherited from NAudio.Wave.IWaveProvider

Detailed Description

Base class for all WaveStream classes. Derives from stream.

Member Function Documentation

◆ 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
countThe 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.

Here is the caller graph for this function:

◆ Seek()

override long NAudio.Wave.WaveStream.Seek ( long offset,
SeekOrigin origin )
inline

Sets the position within the current stream.

Parameters
offsetA byte offset relative to the origin parameter.
originA 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.IOExceptionAn 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
lengthThe length to be set.
Exceptions
NotSupportedExceptionThrown 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
secondsThe 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
bufferThe buffer to write data from.
offsetThe zero-based byte offset in buffer at which to begin writing bytes.
countThe maximum number of bytes to write.
Exceptions
NotSupportedExceptionThrown when attempting to write to a WaveFormatString.

Property Documentation

◆ 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

WaveFormat NAudio.Wave.WaveStream.WaveFormat
getabstract

Retrieves the WaveFormat for this stream.

Implements NAudio.Wave.IWaveProvider.


The documentation for this class was generated from the following file: