public class DmoChannelResampler : DmoResampler
Resampler based on the DmoResampler which can change the number of channels based on a ChannelMatrix. Supported since Windows XP.
DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix)
Initializes a new instance of the DmoChannelResampler class.
public void DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix)
Parameters
source
IWaveSourceUnderlying source which has to get resampled.
channelMatrix
ChannelMatrixChannelMatrix which defines how to map each channel.
DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix, WaveFormat outputFormat)
Initializes a new instance of the DmoChannelResampler class.
public void DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix, WaveFormat outputFormat)
Parameters
source
IWaveSourceUnderlying source which has to get resampled.
channelMatrix
ChannelMatrixChannelMatrix which defines how to map each channel.
outputFormat
WaveFormatWaveformat, which specifies the new format. Note, that by far not all formats are supported.
Exceptions
System.ArgumentNullException
source or channelMatrix or outputFormat
System.ArgumentException
The number of channels of the source has to be equal to the number of input channels specified by the channelMatrix.
DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix, Int32 destinationSampleRate)
Initializes a new instance of the DmoChannelResampler class.
public void DmoChannelResampler(IWaveSource source, ChannelMatrix channelMatrix, Int32 destinationSampleRate)
Parameters
source
IWaveSourceUnderlying source which has to get resampled.
channelMatrix
ChannelMatrixChannelMatrix which defines how to map each channel.
destinationSampleRate
Int32The destination sample rate.
CommitChannelMatrixChanges()
Commits all channel-matrix-changes.
ChannelMatrix
Gets the channel matrix.
public ChannelMatrix ChannelMatrix { get; }
Remarks
If any changes to the channel matrix are made, use the CommitChannelMatrixChanges method to commit them.