Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.WaveRecorder Class Reference

Utility class to intercept audio from an IWaveProvider and save it to disk. More...

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

Public Member Functions

 WaveRecorder (IWaveProvider source, string destination)
 Constructs a new WaveRecorder.
 
int Read (byte[] buffer, int offset, int count)
 Reads a specified number of bytes from the source and writes them to the writer, returning the number of bytes read.
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 

Properties

WaveFormat WaveFormat [get]
 The WaveFormat.
 
- Properties inherited from NAudio.Wave.IWaveProvider

Private Attributes

WaveFileWriter writer
 
IWaveProvider source
 

Detailed Description

Utility class to intercept audio from an IWaveProvider and save it to disk.

Constructor & Destructor Documentation

◆ WaveRecorder()

NAudio.Wave.WaveRecorder.WaveRecorder ( IWaveProvider source,
string destination )
inline

Constructs a new WaveRecorder.

Parameters
destinationThe location to write the WAV file to
sourceThe Source Wave Provider

Member Function Documentation

◆ Dispose()

void NAudio.Wave.WaveRecorder.Dispose ( )
inline

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This method disposes the writer if it is not null and sets it to null.

Here is the call graph for this function:

◆ Read()

int NAudio.Wave.WaveRecorder.Read ( byte[] buffer,
int offset,
int count )
inline

Reads a specified number of bytes from the source and writes them to the writer, returning the number of bytes read.

Parameters
bufferThe buffer to read the bytes into.
offsetThe zero-based byte offset in buffer at which to begin storing the data read from the current stream.
countThe maximum number of bytes to read.
Returns
The total number of bytes read into the buffer.

This method reads a maximum of count bytes from the source into the buffer at the specified offset . It then writes the actual number of bytes read to the writer and returns this value.

Implements NAudio.Wave.IWaveProvider.

Here is the call graph for this function:

Member Data Documentation

◆ source

IWaveProvider NAudio.Wave.WaveRecorder.source
private

◆ writer

WaveFileWriter NAudio.Wave.WaveRecorder.writer
private

Property Documentation

◆ WaveFormat

WaveFormat NAudio.Wave.WaveRecorder.WaveFormat
get

The WaveFormat.

Implements NAudio.Wave.IWaveProvider.


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