Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.StereoToMonoProvider16 Class Reference

Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together. More...

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

Public Member Functions

 StereoToMonoProvider16 (IWaveProvider sourceProvider)
 Creates a new mono waveprovider based on a stereo input.
 
int Read (byte[] buffer, int offset, int count)
 Reads audio data from the source provider into the buffer and returns the number of samples read.
 

Properties

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.
 
- Properties inherited from NAudio.Wave.IWaveProvider

Private Attributes

readonly IWaveProvider sourceProvider
 
byte[] sourceBuffer
 

Detailed Description

Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together.

Constructor & Destructor Documentation

◆ StereoToMonoProvider16()

NAudio.Wave.StereoToMonoProvider16.StereoToMonoProvider16 ( IWaveProvider sourceProvider)
inline

Creates a new mono waveprovider based on a stereo input.

Parameters
sourceProviderStereo 16 bit PCM input

Member Function Documentation

◆ 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
bufferThe buffer to store the audio data.
offsetThe offset in the buffer at which to start storing the audio data.
countThe 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.

Here is the call graph for this function:

Member Data Documentation

◆ sourceBuffer

byte [] NAudio.Wave.StereoToMonoProvider16.sourceBuffer
private

◆ sourceProvider

readonly IWaveProvider NAudio.Wave.StereoToMonoProvider16.sourceProvider
private

Property Documentation

◆ 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

Output Wave Format.

Implements NAudio.Wave.IWaveProvider.


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