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

Base class for creating a 32 bit floating point wave provider Can also be used as a base class for an ISampleProvider that can be plugged straight into anything requiring an IWaveProvider. More...

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

Public Member Functions

 WaveProvider32 ()
 Initializes a new instance of the WaveProvider32 class defaulting to 44.1kHz mono.
 
 WaveProvider32 (int sampleRate, int channels)
 Initializes a new instance of the WaveProvider32 class with the specified sample rate and number of channels.
 
void SetWaveFormat (int sampleRate, int channels)
 Sets the wave format using the specified sample rate and number of channels.
 
int Read (byte[] buffer, int offset, int count)
 Reads a specified number of samples from the buffer starting at the given offset and returns the number of samples read.
 
int Read (float[] buffer, int offset, int sampleCount)
 Method to override in derived classes Supply the requested number of samples into the buffer.
 

Properties

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

Private Attributes

WaveFormat waveFormat
 

Detailed Description

Base class for creating a 32 bit floating point wave provider Can also be used as a base class for an ISampleProvider that can be plugged straight into anything requiring an IWaveProvider.

Constructor & Destructor Documentation

◆ WaveProvider32() [1/2]

NAudio.Wave.WaveProvider32.WaveProvider32 ( )
inline

Initializes a new instance of the WaveProvider32 class defaulting to 44.1kHz mono.

◆ WaveProvider32() [2/2]

NAudio.Wave.WaveProvider32.WaveProvider32 ( int sampleRate,
int channels )
inline

Initializes a new instance of the WaveProvider32 class with the specified sample rate and number of channels.

Here is the call graph for this function:

Member Function Documentation

◆ Read() [1/2]

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

Reads a specified number of samples from the buffer starting at the given offset and returns the number of samples read.

Parameters
bufferThe buffer containing the samples to be read.
offsetThe offset within the buffer at which to start reading.
sampleCountThe number of samples to read from the buffer.
Returns
The number of samples read from the buffer.

This method reads a specified number of samples from the buffer starting at the given offset. It returns the actual number of samples read, which may be less than the requested sample count if the end of the buffer is reached.

Implements NAudio.Wave.IWaveProvider.

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

◆ Read() [2/2]

int NAudio.Wave.WaveProvider32.Read ( float[] buffer,
int offset,
int sampleCount )
abstract

Method to override in derived classes Supply the requested number of samples into the buffer.

Implements NAudio.Wave.ISampleProvider.

◆ SetWaveFormat()

void NAudio.Wave.WaveProvider32.SetWaveFormat ( int sampleRate,
int channels )
inline

Sets the wave format using the specified sample rate and number of channels.

Parameters
sampleRateThe sample rate for the wave format.
channelsThe number of channels for the wave format.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ waveFormat

WaveFormat NAudio.Wave.WaveProvider32.waveFormat
private

Property Documentation

◆ WaveFormat

WaveFormat NAudio.Wave.WaveProvider32.WaveFormat
get

The Wave Format.

Implements NAudio.Wave.IWaveProvider.


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