public class ChannelMatrix
Represents a channel conversion matrix. For more information, see .
FiveDotOneSurroundWithRearToMono
Defines a 5.1 surround (with rear) to mono channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithRearToMono
FiveDotOneSurroundWithRearToSevenDotOne
Defines a 5.1 surround (with rear) to 7.1 surround channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithRearToSevenDotOne
FiveDotOneSurroundWithRearToStereo
Defines a 5.1 surround (with rear) to stereo channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithRearToStereo
FiveDotOneSurroundWithSideToMono
Defines a 5.1 surround (with side) to mono channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithSideToMono
FiveDotOneSurroundWithSideToSevenDotOne
Defines a 5.1 surround (with side) to 7.1 surround channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithSideToSevenDotOne
FiveDotOneSurroundWithSideToStereo
Defines a 5.1 surround (with side) to stereo channel conversion matrix.
public readonly ChannelMatrix FiveDotOneSurroundWithSideToStereo
MonoToFiveDotOneSurroundWithRear
Defines a mono to 5.1 surround (with rear) channel conversion matrix.
public readonly ChannelMatrix MonoToFiveDotOneSurroundWithRear
MonoToFiveDotOneSurroundWithSide
Defines a mono to 5.1 surround (with side) channel conversion matrix.
public readonly ChannelMatrix MonoToFiveDotOneSurroundWithSide
MonoToSevenDotOneSurround
Defines a mono to 7.1 surround channel conversion matrix.
public readonly ChannelMatrix MonoToSevenDotOneSurround
MonoToStereoMatrix
Defines a mono to stereo conversion matrix.
public readonly ChannelMatrix MonoToStereoMatrix
SevenDotOneSurroundToFiveDotOneSurroundWithRear
Defines a 7.1 surround to 5.1 surround (with rear) channel conversion matrix
public readonly ChannelMatrix SevenDotOneSurroundToFiveDotOneSurroundWithRear
SevenDotOneSurroundToFiveDotOneSurroundWithSide
Defines a 7.1 surround to 5.1 surround (with side) channel conversion matrix
public readonly ChannelMatrix SevenDotOneSurroundToFiveDotOneSurroundWithSide
SevenDotOneSurroundToMono
Defines a 7.1 surround channel to mono conversion matrix.
public readonly ChannelMatrix SevenDotOneSurroundToMono
SevenDotOneSurroundToStereo
Defines a 7.1 surround to stereo channel conversion matrix.
public readonly ChannelMatrix SevenDotOneSurroundToStereo
StereoToFiveDotOneSurroundWithRear
Defines a stereo to 5.1 surround (with rear) channel conversion matrix.
public readonly ChannelMatrix StereoToFiveDotOneSurroundWithRear
StereoToFiveDotOneSurroundWithSide
Defines a stereo to 5.1 surround (with side) channel conversion matrix.
public readonly ChannelMatrix StereoToFiveDotOneSurroundWithSide
StereoToMonoMatrix
Defines a stereo to mono conversion matrix.
public readonly ChannelMatrix StereoToMonoMatrix
StereoToSevenDotOneSurround
Defines a stereo to 7.1 surround channel conversion matrix.
public readonly ChannelMatrix StereoToSevenDotOneSurround
ChannelMatrix(ChannelMask inputMask, ChannelMask outputMask)
Initializes a new instance of the ChannelMatrix class.
public void ChannelMatrix(ChannelMask inputMask, ChannelMask outputMask)
Parameters
inputMask
ChannelMaskThe ChannelMask of the input signal.
outputMask
ChannelMaskThe ChannelMask of the output signal.
Exceptions
ArgumentException
Invalid inputMask/outputMask.
Flip()
Flips the axis of the matrix and returns the new matrix with the flipped axis.
public ChannelMatrix Flip()
Returns
A matrix with flipped axis.
Remarks
This could be typically used in the following scenario: There is a 5.1 to stereo matrix. By using the Flip method the 5.1 to stereo matrix can be converted into a stereo to 5.1 matrix.
GetMatrix(ChannelMask from, ChannelMask to)
Gets a ChannelMatrix to convert between the two specified ChannelMasks.
public static ChannelMatrix GetMatrix(ChannelMask from, ChannelMask to)
Parameters
from
ChannelMaskThe ChannelMask of the input stream.
to
ChannelMaskThe desired ChannelMask of the output stream.
Returns
A ChannelMatrix to convert between the two specified ChannelMasks.
Exceptions
ArgumentException
from equals to
KeyNotFoundException
No accurate ChannelMatrix was found.
GetMatrix(WaveFormat from, WaveFormat to)
Gets a ChannelMatrix to convert between the two specified formats.
public static ChannelMatrix GetMatrix(WaveFormat from, WaveFormat to)
Parameters
from
WaveFormatThe input waveformat.
to
WaveFormatThe output waveformat.
Returns
A ChannelMatrix to convert between the two specified formats. If no channelmask could be found, the return value is null.
Exceptions
ArgumentException
The channelmask of the input format equals the channelmask of the output format.
KeyNotFoundException
No accurate ChannelMatrix was found.
GetOneDimensionalMatrix()
Returns a one dimensional array which contains the channel conversion matrix coefficients.
public Single[] GetOneDimensionalMatrix()
Returns
A one dimensional array which contains the channel conversion matrix coefficients
Remarks
This method is primarily used in combination with the SetUserChannelMtx method.
SetMatrix(Single[,] matrix)
Sets the channel conversion matrix. The x-axis of the matrix specifies the output channels. The y-axis of the matrix specifies the input channels.
public void SetMatrix(Single[,] matrix)
Parameters
matrix
Single[,]Channel conversion matrix to use.
Height
Gets the number of rows of the channel conversion matrix.
public Int32 Height { get; }
InputChannelCount
Gets the input signals number of channels.
public Int32 InputChannelCount { get; }
Remarks
The InputChannelCount property always returns the same value as the Height property.
InputMask
Gets the ChannelMask of the input signal.
public ChannelMask InputMask { get; }
Item
Gets or sets a ChannelMatrixElement of the ChannelMatrix.
public ChannelMatrixElement Item { get; set; }
Parameters
input
The zero-based index of the input channel.
output
The zero-based index of the output channel.
Returns
The ChannelMatrixElement of the ChannelMatrix at the specified position.
OutputChannelCount
Gets the output signals number of channels.
public Int32 OutputChannelCount { get; }
Remarks
The OutputChannelCount property always returns the same value as the Width property.
OutputMask
Gets the ChannelMask of the output signal.
public ChannelMask OutputMask { get; }
Width
Gets the number of columns of the channel conversion matrix.
public Int32 Width { get; }