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

Converts 16 bit PCM to IEEE float, optionally adjusting volume along the way. More...

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

Public Member Functions

 Wave16ToFloatProvider (IWaveProvider sourceProvider)
 Creates a new Wave16toFloatProvider.
 
int Read (byte[] destBuffer, int offset, int numBytes)
 Reads audio data from the source buffer, converts it to floating point, applies volume scaling, and writes the result to the destination buffer.
 

Properties

WaveFormat WaveFormat [get]
 IWaveProvider.WaveFormat
 
float Volume [get, set]
 Volume of this channel. 1.0 = full scale.
 
- Properties inherited from NAudio.Wave.IWaveProvider

Private Attributes

IWaveProvider sourceProvider
 
readonly WaveFormat waveFormat
 
volatile float volume
 
byte[] sourceBuffer
 

Detailed Description

Converts 16 bit PCM to IEEE float, optionally adjusting volume along the way.

Constructor & Destructor Documentation

◆ Wave16ToFloatProvider()

NAudio.Wave.Wave16ToFloatProvider.Wave16ToFloatProvider ( IWaveProvider sourceProvider)
inline

Creates a new Wave16toFloatProvider.

Parameters
sourceProviderthe source provider
Here is the call graph for this function:

Member Function Documentation

◆ Read()

int NAudio.Wave.Wave16ToFloatProvider.Read ( byte[] destBuffer,
int offset,
int numBytes )
inline

Reads audio data from the source buffer, converts it to floating point, applies volume scaling, and writes the result to the destination buffer.

Parameters
destBufferThe destination buffer to write the converted audio data to.
offsetThe offset in the destination buffer at which to start writing the converted audio data.
numBytesThe number of bytes to read and convert from the source buffer.
Returns
The total number of bytes written to the destination buffer after conversion.

Implements NAudio.Wave.IWaveProvider.

Here is the call graph for this function:

Member Data Documentation

◆ sourceBuffer

byte [] NAudio.Wave.Wave16ToFloatProvider.sourceBuffer
private

◆ sourceProvider

IWaveProvider NAudio.Wave.Wave16ToFloatProvider.sourceProvider
private

◆ volume

volatile float NAudio.Wave.Wave16ToFloatProvider.volume
private

◆ waveFormat

readonly WaveFormat NAudio.Wave.Wave16ToFloatProvider.waveFormat
private

Property Documentation

◆ Volume

float NAudio.Wave.Wave16ToFloatProvider.Volume
getset

Volume of this channel. 1.0 = full scale.

◆ WaveFormat

WaveFormat NAudio.Wave.Wave16ToFloatProvider.WaveFormat
get

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