Implementation of Com IStream.
More...
|
| ComStream (Stream stream) |
|
override void | Flush () |
| Flushes the stream's buffer.
|
|
override int | Read (byte[] buffer, int offset, int count) |
|
override long | Seek (long offset, SeekOrigin origin) |
|
override void | SetLength (long value) |
| Sets the length of the current stream.
|
|
override void | Write (byte[] buffer, int offset, int count) |
|
override void | Close () |
| Closes the stream and releases any system resources associated with it.
|
|
|
override void | Dispose (bool disposing) |
| Disposes the stream if it is not null.
|
|
|
void IStream. | Clone (out IStream ppstm) |
| Clones the current stream.
|
|
void IStream. | Commit (int grfCommitFlags) |
| Flushes the stream.
|
|
void IStream. | CopyTo (IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) |
| Copies a specified number of bytes from the current stream to another stream.
|
|
void IStream. | LockRegion (long libOffset, long cb, int dwLockType) |
| Locks a region of the stream.
|
|
void IStream. | Read (byte[] pv, int cb, IntPtr pcbRead) |
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
void IStream. | Revert () |
| Reverts the stream to its previous state.
|
|
void IStream. | Seek (long dlibMove, int dwOrigin, IntPtr plibNewPosition) |
| Sets the position within the current stream.
|
|
void IStream. | SetSize (long libNewSize) |
| Sets the size of the stream to the specified new size.
|
|
void IStream. | Stat (out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag) |
| Retrieves the statistics for this stream.
|
|
void IStream. | UnlockRegion (long libOffset, long cb, int dwLockType) |
| Unlocks the specified region of the stream.
|
|
void IStream. | Write (byte[] pv, int cb, IntPtr pcbWritten) |
| Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
|
|
Implementation of Com IStream.
◆ ComStream()
NAudio.Wave.ComStream.ComStream |
( |
Stream | stream | ) |
|
|
inline |
◆ Clone()
void IStream. NAudio.Wave.ComStream.Clone |
( |
out IStream | ppstm | ) |
|
|
inlineprivate |
Clones the current stream.
- Parameters
-
ppstm | When this method returns, contains a reference to the cloned stream. This parameter is passed uninitialized. |
This method creates a new stream object that is a copy of the current stream. The cloned stream is independent of the original stream, and any changes to the original stream do not affect the cloned stream, and vice versa.
◆ Close()
override void NAudio.Wave.ComStream.Close |
( |
| ) |
|
|
inline |
Closes the stream and releases any system resources associated with it.
This method closes the underlying stream if it is not null and releases any system resources associated with it.
◆ Commit()
void IStream. NAudio.Wave.ComStream.Commit |
( |
int | grfCommitFlags | ) |
|
|
inlineprivate |
Flushes the stream.
- Parameters
-
grfCommitFlags | Flags that specify the nature of the commit operation. |
This method flushes the underlying stream, writing any buffered data to the underlying file or network stream.
◆ CopyTo()
void IStream. NAudio.Wave.ComStream.CopyTo |
( |
IStream | pstm, |
|
|
long | cb, |
|
|
IntPtr | pcbRead, |
|
|
IntPtr | pcbWritten ) |
|
inlineprivate |
Copies a specified number of bytes from the current stream to another stream.
- Parameters
-
pstm | The stream to which the data is to be copied. |
cb | The number of bytes to be copied from the current stream. |
pcbRead | A pointer to a 64-bit value that receives the actual number of bytes read from the source stream. |
pcbWritten | A pointer to a 64-bit value that receives the actual number of bytes written to the destination stream. |
◆ Dispose()
override void NAudio.Wave.ComStream.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotected |
Disposes the stream if it is not null.
- Parameters
-
disposing | A boolean value indicating whether the method is being called from the Dispose method and not from the finalizer. |
This method disposes the stream if it is not null and sets it to null.
◆ Flush()
override void NAudio.Wave.ComStream.Flush |
( |
| ) |
|
|
inline |
Flushes the stream's buffer.
This method flushes the buffer of the underlying stream, writing any buffered data to the underlying device.
◆ LockRegion()
void IStream. NAudio.Wave.ComStream.LockRegion |
( |
long | libOffset, |
|
|
long | cb, |
|
|
int | dwLockType ) |
|
inlineprivate |
Locks a region of the stream.
- Parameters
-
libOffset | The byte offset of the beginning of the range to be locked. |
cb | The length of the range to be locked, in bytes. |
dwLockType | The type of access to be granted for the specified range. |
◆ Read() [1/2]
override int NAudio.Wave.ComStream.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
◆ Read() [2/2]
void IStream. NAudio.Wave.ComStream.Read |
( |
byte[] | pv, |
|
|
int | cb, |
|
|
IntPtr | pcbRead ) |
|
inlineprivate |
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 might 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.
◆ Revert()
void IStream. NAudio.Wave.ComStream.Revert |
( |
| ) |
|
|
inlineprivate |
Reverts the stream to its previous state.
◆ Seek() [1/2]
void IStream. NAudio.Wave.ComStream.Seek |
( |
long | dlibMove, |
|
|
int | dwOrigin, |
|
|
IntPtr | plibNewPosition ) |
|
inlineprivate |
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.
◆ Seek() [2/2]
override long NAudio.Wave.ComStream.Seek |
( |
long | offset, |
|
|
SeekOrigin | origin ) |
|
inline |
◆ SetLength()
override void NAudio.Wave.ComStream.SetLength |
( |
long | value | ) |
|
|
inline |
Sets the length of the current stream.
- Parameters
-
value | The desired length of the stream in bytes. |
This method sets the length of the current stream to the specified value. If the specified value is less than the current length of the stream, the stream is truncated. If the specified value is greater than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and new lengths are undefined.
◆ SetSize()
void IStream. NAudio.Wave.ComStream.SetSize |
( |
long | libNewSize | ) |
|
|
inlineprivate |
Sets the size of the stream to the specified new size.
- Parameters
-
libNewSize | The new size to set for the stream. |
This method sets the size of the stream to the specified new size.
◆ Stat()
void IStream. NAudio.Wave.ComStream.Stat |
( |
out System::Runtime::InteropServices::ComTypes::STATSTG | pstatstg, |
|
|
int | grfStatFlag ) |
|
inlineprivate |
Retrieves the statistics for this stream.
- Parameters
-
pstatstg | When this method returns, contains a STATSTG structure that describes this stream object. This parameter is passed uninitialized. |
grfStatFlag | Members of the STATFLAG enumeration that control the type of statistics returned in pstatstg. |
- Exceptions
-
ObjectDisposedException | Thrown when the stream has been disposed. |
◆ UnlockRegion()
void IStream. NAudio.Wave.ComStream.UnlockRegion |
( |
long | libOffset, |
|
|
long | cb, |
|
|
int | dwLockType ) |
|
inlineprivate |
Unlocks the specified region of the stream.
- Parameters
-
libOffset | The byte offset of the beginning of the region to be unlocked. |
cb | The length of the region to be unlocked in bytes. |
dwLockType | The type of access to the region to be unlocked. |
◆ Write() [1/2]
override void NAudio.Wave.ComStream.Write |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
◆ Write() [2/2]
void IStream. NAudio.Wave.ComStream.Write |
( |
byte[] | pv, |
|
|
int | cb, |
|
|
IntPtr | pcbWritten ) |
|
inlineprivate |
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
- Parameters
-
buffer | An array of bytes. This method copies count bytes from buffer to the current stream. |
offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | The number of bytes to be written to the current stream. |
This method writes count bytes from buffer to the current stream at the current position. The current position within the stream is advanced by count. If the write operation is successful, the current position within the stream is advanced by count; otherwise, the current position within the stream is unchanged.
◆ stream
Stream NAudio.Wave.ComStream.stream |
|
private |
◆ CanRead
override bool NAudio.Wave.ComStream.CanRead |
|
get |
◆ CanSeek
override bool NAudio.Wave.ComStream.CanSeek |
|
get |
◆ CanWrite
override bool NAudio.Wave.ComStream.CanWrite |
|
get |
◆ Length
override long NAudio.Wave.ComStream.Length |
|
get |
◆ Position
override long NAudio.Wave.ComStream.Position |
|
getset |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Wasapi/ComStream.cs