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

IWaveProvider that passes through an ACM Codec. More...

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

Public Member Functions

 WaveFormatConversionProvider (WaveFormat targetFormat, IWaveProvider sourceProvider)
 Create a new WaveFormat conversion stream.
 
void Reposition ()
 Repositions the conversion stream and resets leftover bytes and offsets.
 
int Read (byte[] buffer, int offset, int count)
 Reads data from the input buffer and returns the number of bytes read.
 
void Dispose ()
 Disposes this resource.
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 

Properties

WaveFormat WaveFormat [get]
 Gets the WaveFormat of this stream.
 
- Properties inherited from NAudio.Wave.IWaveProvider

Private Member Functions

 ~WaveFormatConversionProvider ()
 Finalizer.
 

Private Attributes

readonly AcmStream conversionStream
 
readonly IWaveProvider sourceProvider
 
readonly int preferredSourceReadSize
 
int leftoverDestBytes
 
int leftoverDestOffset
 
int leftoverSourceBytes
 
bool isDisposed
 

Detailed Description

IWaveProvider that passes through an ACM Codec.

Constructor & Destructor Documentation

◆ WaveFormatConversionProvider()

NAudio.Wave.WaveFormatConversionProvider.WaveFormatConversionProvider ( WaveFormat targetFormat,
IWaveProvider sourceProvider )
inline

Create a new WaveFormat conversion stream.

Parameters
targetFormatDesired output format
sourceProviderSource Provider

◆ ~WaveFormatConversionProvider()

NAudio.Wave.WaveFormatConversionProvider.~WaveFormatConversionProvider ( )
inlineprivate

Finalizer.

Here is the call graph for this function:

Member Function Documentation

◆ Dispose() [1/2]

void NAudio.Wave.WaveFormatConversionProvider.Dispose ( )
inline

Disposes this resource.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dispose() [2/2]

virtual void NAudio.Wave.WaveFormatConversionProvider.Dispose ( bool disposing)
inlineprotectedvirtual

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

This method calls the Dispose(Boolean) method, passing in 'true', and suppresses the finalization of the object.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Read()

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

Reads data from the input buffer and returns the number of bytes read.

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

This method reads data from the input buffer and returns the total number of bytes read into the buffer. It ensures that the count is a multiple of the block align, and if not, it adjusts the count to read complete blocks. The method then proceeds to copy any leftover destination bytes, followed by converting one full source buffer and saving any leftover bytes for the next call to Read. The method returns the total number of bytes read into the buffer.

Implements NAudio.Wave.IWaveProvider.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reposition()

void NAudio.Wave.WaveFormatConversionProvider.Reposition ( )
inline

Repositions the conversion stream and resets leftover bytes and offsets.

Here is the call graph for this function:

Member Data Documentation

◆ conversionStream

readonly AcmStream NAudio.Wave.WaveFormatConversionProvider.conversionStream
private

◆ isDisposed

bool NAudio.Wave.WaveFormatConversionProvider.isDisposed
private

◆ leftoverDestBytes

int NAudio.Wave.WaveFormatConversionProvider.leftoverDestBytes
private

◆ leftoverDestOffset

int NAudio.Wave.WaveFormatConversionProvider.leftoverDestOffset
private

◆ leftoverSourceBytes

int NAudio.Wave.WaveFormatConversionProvider.leftoverSourceBytes
private

◆ preferredSourceReadSize

readonly int NAudio.Wave.WaveFormatConversionProvider.preferredSourceReadSize
private

◆ sourceProvider

readonly IWaveProvider NAudio.Wave.WaveFormatConversionProvider.sourceProvider
private

Property Documentation

◆ WaveFormat

WaveFormat NAudio.Wave.WaveFormatConversionProvider.WaveFormat
get

Gets the WaveFormat of this stream.

Implements NAudio.Wave.IWaveProvider.


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