Allows any number of inputs to be patched to outputs Uses could include swapping left and right channels, turning mono into stereo, feeding different input sources to different soundcard outputs etc.
More...
|
| MultiplexingWaveProvider (IEnumerable< IWaveProvider > inputs) |
| Creates a multiplexing wave provider, allowing re-patching of input channels to different output channels. Number of outputs is equal to total number of channels in inputs.
|
|
| MultiplexingWaveProvider (IEnumerable< IWaveProvider > inputs, int numberOfOutputChannels) |
| Creates a multiplexing wave provider, allowing re-patching of input channels to different output channels.
|
|
int | Read (byte[] buffer, int offset, int count) |
| Reads audio data from the input buffer and writes it to the output buffer.
|
|
void | ConnectInputToOutput (int inputChannel, int outputChannel) |
| Connects the input channel to the output channel.
|
|
|
WaveFormat | WaveFormat [get] |
| The WaveFormat of this WaveProvider.
|
|
int | InputChannelCount [get] |
| The number of input channels. Note that this is not the same as the number of input wave providers. If you pass in one stereo and one mono input provider, the number of input channels is three.
|
|
int | OutputChannelCount [get] |
| The number of output channels, as specified in the constructor.
|
|
Allows any number of inputs to be patched to outputs Uses could include swapping left and right channels, turning mono into stereo, feeding different input sources to different soundcard outputs etc.
◆ MultiplexingWaveProvider() [1/2]
Creates a multiplexing wave provider, allowing re-patching of input channels to different output channels. Number of outputs is equal to total number of channels in inputs.
- Parameters
-
inputs | Input wave providers. Must all be of the same format, but can have any number of channels |
◆ MultiplexingWaveProvider() [2/2]
NAudio.Wave.MultiplexingWaveProvider.MultiplexingWaveProvider |
( |
IEnumerable< IWaveProvider > | inputs, |
|
|
int | numberOfOutputChannels ) |
|
inline |
Creates a multiplexing wave provider, allowing re-patching of input channels to different output channels.
- Parameters
-
inputs | Input wave providers. Must all be of the same format, but can have any number of channels |
numberOfOutputChannels | Desired number of output channels. (-1 means use total number of input channels) |
◆ ConnectInputToOutput()
void NAudio.Wave.MultiplexingWaveProvider.ConnectInputToOutput |
( |
int | inputChannel, |
|
|
int | outputChannel ) |
|
inline |
Connects the input channel to the output channel.
- Parameters
-
inputChannel | The input channel to be connected. |
outputChannel | The output channel to be connected. |
- Exceptions
-
ArgumentException | Thrown when the input channel or output channel is invalid. |
◆ Read()
int NAudio.Wave.MultiplexingWaveProvider.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Reads audio data from the input buffer and writes it to the output buffer.
- Parameters
-
buffer | The output buffer to write the audio data to. |
offset | The offset in the output buffer to start writing the data. |
count | The number of bytes to read from the input buffer and write to the output buffer. |
- Returns
- The number of sample frames read and written to the output buffer.
This method reads audio data from all input sources, even if the data is not needed, to keep them in sync. It then processes the input data and writes it to the output buffer based on the specified offset and count. The method modifies the output buffer in place.
Implements NAudio.Wave.IWaveProvider.
◆ bytesPerSample
readonly int NAudio.Wave.MultiplexingWaveProvider.bytesPerSample |
|
private |
◆ inputBuffer
byte [] NAudio.Wave.MultiplexingWaveProvider.inputBuffer |
|
private |
persistent temporary buffer to prevent creating work for garbage collector
◆ inputChannelCount
readonly int NAudio.Wave.MultiplexingWaveProvider.inputChannelCount |
|
private |
◆ inputs
readonly IList<IWaveProvider> NAudio.Wave.MultiplexingWaveProvider.inputs |
|
private |
◆ mappings
readonly List<int> NAudio.Wave.MultiplexingWaveProvider.mappings |
|
private |
◆ outputChannelCount
readonly int NAudio.Wave.MultiplexingWaveProvider.outputChannelCount |
|
private |
◆ InputChannelCount
int NAudio.Wave.MultiplexingWaveProvider.InputChannelCount |
|
get |
The number of input channels. Note that this is not the same as the number of input wave providers. If you pass in one stereo and one mono input provider, the number of input channels is three.
◆ OutputChannelCount
int NAudio.Wave.MultiplexingWaveProvider.OutputChannelCount |
|
get |
The number of output channels, as specified in the constructor.
◆ WaveFormat
WaveFormat NAudio.Wave.MultiplexingWaveProvider.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/MultiplexingWaveProvider.cs