Converts IEEE float to 16 bit PCM, optionally clipping and adjusting volume along the way.
More...
|
| WaveFloatTo16Provider (IWaveProvider sourceProvider) |
| Creates a new WaveFloatTo16Provider.
|
|
int | Read (byte[] destBuffer, int offset, int numBytes) |
| Reads audio data from the source buffer, adjusts the volume, clips the samples, and writes the result to the destination buffer.
|
|
Converts IEEE float to 16 bit PCM, optionally clipping and adjusting volume along the way.
◆ WaveFloatTo16Provider()
NAudio.Wave.WaveFloatTo16Provider.WaveFloatTo16Provider |
( |
IWaveProvider | sourceProvider | ) |
|
|
inline |
Creates a new WaveFloatTo16Provider.
- Parameters
-
sourceProvider | the source provider |
◆ Read()
int NAudio.Wave.WaveFloatTo16Provider.Read |
( |
byte[] | destBuffer, |
|
|
int | offset, |
|
|
int | numBytes ) |
|
inline |
Reads audio data from the source buffer, adjusts the volume, clips the samples, and writes the result to the destination buffer.
- Parameters
-
destBuffer | The destination buffer to write the audio data to. |
offset | The offset in the destination buffer at which to start writing. |
numBytes | The number of bytes to read from the source buffer and write to the destination buffer. |
- Returns
- The number of bytes written to the destination buffer.
This method reads audio data from the source buffer, adjusts the volume of each sample, clips the samples to prevent overflow, and writes the result to the destination buffer. The method modifies the destination buffer in place.
Implements NAudio.Wave.IWaveProvider.
◆ sourceBuffer
byte [] NAudio.Wave.WaveFloatTo16Provider.sourceBuffer |
|
private |
◆ sourceProvider
readonly IWaveProvider NAudio.Wave.WaveFloatTo16Provider.sourceProvider |
|
private |
◆ volume
volatile float NAudio.Wave.WaveFloatTo16Provider.volume |
|
private |
◆ waveFormat
readonly WaveFormat NAudio.Wave.WaveFloatTo16Provider.waveFormat |
|
private |
◆ Volume
float NAudio.Wave.WaveFloatTo16Provider.Volume |
|
getset |
Volume of this channel. 1.0 = full scale.
◆ WaveFormat
WaveFormat NAudio.Wave.WaveFloatTo16Provider.WaveFormat |
|
get |
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/WaveFloatTo16Provider.cs