Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together.
More...
|
float | LeftVolume [get, set] |
| 1.0 to mix the mono source entirely to the left channel
|
|
float | RightVolume [get, set] |
| 1.0 to mix the mono source entirely to the right channel
|
|
WaveFormat | WaveFormat [get, private set] |
| Output Wave Format.
|
|
Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together.
◆ StereoToMonoProvider16()
NAudio.Wave.StereoToMonoProvider16.StereoToMonoProvider16 |
( |
IWaveProvider | sourceProvider | ) |
|
|
inline |
Creates a new mono waveprovider based on a stereo input.
- Parameters
-
sourceProvider | Stereo 16 bit PCM input |
◆ Read()
int NAudio.Wave.StereoToMonoProvider16.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Reads audio data from the source provider into the buffer and returns the number of samples read.
- Parameters
-
buffer | The buffer to store the audio data. |
offset | The offset in the buffer at which to start storing the audio data. |
count | The number of samples to read. |
- Returns
- The number of samples read from the source provider and stored in the buffer.
This method reads audio data from the source provider into the buffer. It first ensures that the source buffer is large enough to hold the required number of bytes. It then reads the source data, processes it by applying left and right volume factors, performs hard limiting, and stores the processed samples in the destination buffer. The method returns the number of samples read from the source provider and stored in the buffer.
Implements NAudio.Wave.IWaveProvider.
◆ sourceBuffer
byte [] NAudio.Wave.StereoToMonoProvider16.sourceBuffer |
|
private |
◆ sourceProvider
readonly IWaveProvider NAudio.Wave.StereoToMonoProvider16.sourceProvider |
|
private |
◆ LeftVolume
float NAudio.Wave.StereoToMonoProvider16.LeftVolume |
|
getset |
1.0 to mix the mono source entirely to the left channel
◆ RightVolume
float NAudio.Wave.StereoToMonoProvider16.RightVolume |
|
getset |
1.0 to mix the mono source entirely to the right channel
◆ WaveFormat
WaveFormat NAudio.Wave.StereoToMonoProvider16.WaveFormat |
|
getprivate set |
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/StereoToMonoProvider16.cs