Helper class allowing us to modify the volume of a 16 bit stream without converting to IEEE float.
More...
|
float | Volume [get, set] |
| Gets or sets volume. 1.0 is full scale, 0.0 is silence, anything over 1.0 will amplify but potentially clip.
|
|
WaveFormat | WaveFormat [get] |
| WaveFormat of this WaveProvider.
|
|
Helper class allowing us to modify the volume of a 16 bit stream without converting to IEEE float.
◆ VolumeWaveProvider16()
NAudio.Wave.VolumeWaveProvider16.VolumeWaveProvider16 |
( |
IWaveProvider | sourceProvider | ) |
|
|
inline |
Constructs a new VolumeWaveProvider16.
- Parameters
-
sourceProvider | Source provider, must be 16 bit PCM |
◆ Read()
int NAudio.Wave.VolumeWaveProvider16.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Reads data from the source provider into the buffer and applies volume adjustments if necessary.
- Parameters
-
buffer | The buffer to read data into. |
offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | The maximum number of bytes to read. |
- Returns
- The total number of bytes read into the buffer.
This method reads data from the source provider into the buffer, and if the volume is not 1.0f, it applies volume adjustments to the samples in the buffer. If the volume is 0.0f, it fills the buffer with zeros.
Implements NAudio.Wave.IWaveProvider.
◆ sourceProvider
readonly IWaveProvider NAudio.Wave.VolumeWaveProvider16.sourceProvider |
|
private |
◆ volume
float NAudio.Wave.VolumeWaveProvider16.volume |
|
private |
◆ Volume
float NAudio.Wave.VolumeWaveProvider16.Volume |
|
getset |
Gets or sets volume. 1.0 is full scale, 0.0 is silence, anything over 1.0 will amplify but potentially clip.
◆ WaveFormat
WaveFormat NAudio.Wave.VolumeWaveProvider16.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/VolumeWaveProvider16.cs