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

Converts from mono to stereo, allowing freedom to route all, some, or none of the incoming signal to left or right channels. More...

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

Public Member Functions

 MonoToStereoProvider16 (IWaveProvider sourceProvider)
 Creates a new stereo waveprovider based on a mono input.
 
int Read (byte[] buffer, int offset, int count)
 Reads audio data from the source buffer and processes it to the destination buffer.
 

Properties

float LeftVolume [get, set]
 1.0 to copy the mono stream to the left channel without adjusting volume
 
float RightVolume [get, set]
 1.0 to copy the mono stream to the right channel without adjusting volume
 
WaveFormat WaveFormat [get]
 Output Wave Format.
 
- Properties inherited from NAudio.Wave.IWaveProvider

Private Attributes

readonly IWaveProvider sourceProvider
 
byte[] sourceBuffer
 

Detailed Description

Converts from mono to stereo, allowing freedom to route all, some, or none of the incoming signal to left or right channels.

Constructor & Destructor Documentation

◆ MonoToStereoProvider16()

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

Creates a new stereo waveprovider based on a mono input.

Parameters
sourceProviderMono 16 bit PCM input

Member Function Documentation

◆ Read()

int NAudio.Wave.MonoToStereoProvider16.Read ( byte[] buffer,
int offset,
int count )
inline

Reads audio data from the source buffer and processes it to the destination buffer.

Parameters
bufferThe destination buffer to write the processed audio data to.
offsetThe offset in the destination buffer to start writing the data.
countThe number of bytes to read from the source buffer and process.
Returns
The number of bytes written to the destination buffer after processing the audio data.

This method reads audio data from the source buffer, processes it by applying left and right volume adjustments, and writes the processed data to the destination buffer. It ensures that the source buffer has enough space to accommodate the required number of bytes, reads the source audio data, processes each sample by applying volume adjustments, and writes the processed data to the destination buffer. The method returns the total number of bytes written to the destination buffer after processing the audio data, which is calculated based on the number of samples read and the size of each sample.

Implements NAudio.Wave.IWaveProvider.

Here is the call graph for this function:

Member Data Documentation

◆ sourceBuffer

byte [] NAudio.Wave.MonoToStereoProvider16.sourceBuffer
private

◆ sourceProvider

readonly IWaveProvider NAudio.Wave.MonoToStereoProvider16.sourceProvider
private

Property Documentation

◆ LeftVolume

float NAudio.Wave.MonoToStereoProvider16.LeftVolume
getset

1.0 to copy the mono stream to the left channel without adjusting volume

◆ RightVolume

float NAudio.Wave.MonoToStereoProvider16.RightVolume
getset

1.0 to copy the mono stream to the right channel without adjusting volume

◆ WaveFormat

WaveFormat NAudio.Wave.MonoToStereoProvider16.WaveFormat
get

Output Wave Format.

Implements NAudio.Wave.IWaveProvider.


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