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...
|
| 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.
|
|
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.
◆ 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.
◆ 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
-
buffer | The buffer containing the samples to be read. |
offset | The offset within the buffer at which to start reading. |
sampleCount | The 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.
◆ Read() [2/2]
int NAudio.Wave.WaveProvider32.Read |
( |
float[] | buffer, |
|
|
int | offset, |
|
|
int | sampleCount ) |
|
abstract |
◆ 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
-
sampleRate | The sample rate for the wave format. |
channels | The number of channels for the wave format. |
◆ waveFormat
◆ WaveFormat
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Wave/WaveProviders/WaveProvider32.cs