Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::sound::base::ChannelMixMatrix Class Reference

A class that holds a matrix of gain coefficients mapping from one channel configuration to another. More...

#include <omSoundChannelMixMatrix.h>

Public Member Functions

 ChannelMixMatrix ()
 Create a new channel mix matrix with 0 input and output channels. More...
 
 ChannelMixMatrix (Size newNumInputChannels, Size newNumOutputChannels)
 Create a new channel mix matrix with the specified number of input and output channels. More...
 
 ChannelMixMatrix (const ChannelMixMatrix &other)
 Create a copy of the specified channel mix matrix object. More...
 
 ~ChannelMixMatrix ()
 Destroy this channel mix matrix object and release its resources. More...
 
ChannelMixMatrixoperator= (const ChannelMixMatrix &other)
 Assign the state of the specified channel mix matrix to this mix matrix. More...
 
Size getInputCount () const
 Return the current number of input channels for this channel mix matrix. More...
 
void setInputCount (Size newNumInputChannels)
 Set the number of input channels that this channel mix matrix should have. More...
 
Size getOutputCount () const
 Return the current number of output channels for this channel mix matrix. More...
 
void setOutputCount (Size newNumOutputChannels)
 Set the number of output channels that this channel mix matrix should have. More...
 
void setSize (Size newNumInputChannels, Size newNumOutputChannels)
 Set the number of input and output channels that this channel mix matrix should have. More...
 
Gain getGain (Index inputChannelIndex, Index outputChannelIndex) const
 Return the linear gain associated with the input and output channels at the specified indices. More...
 
void setGain (Index inputChannelIndex, Index outputChannelIndex, Gain newGain)
 Set the linear gain associated with the input and output channels at the specified indices. More...
 
void setGains (Gain newGain)
 Set every input-to-output channel pair to have the specified linear gain value. More...
 
void zero ()
 Set every gain in the channel mix matrix to be 0. More...
 

Detailed Description

A class that holds a matrix of gain coefficients mapping from one channel configuration to another.

This class is used to represent the mapping from one channel configuration to another, where the input configuration with N channels is mapped to the output configuration with M channels using an NxM matrix of linear gain coefficients.

Constructor & Destructor Documentation

om::sound::base::ChannelMixMatrix::ChannelMixMatrix ( )

Create a new channel mix matrix with 0 input and output channels.

om::sound::base::ChannelMixMatrix::ChannelMixMatrix ( Size  newNumInputChannels,
Size  newNumOutputChannels 
)

Create a new channel mix matrix with the specified number of input and output channels.

om::sound::base::ChannelMixMatrix::ChannelMixMatrix ( const ChannelMixMatrix other)

Create a copy of the specified channel mix matrix object.

om::sound::base::ChannelMixMatrix::~ChannelMixMatrix ( )

Destroy this channel mix matrix object and release its resources.

Member Function Documentation

ChannelMixMatrix& om::sound::base::ChannelMixMatrix::operator= ( const ChannelMixMatrix other)

Assign the state of the specified channel mix matrix to this mix matrix.

Size om::sound::base::ChannelMixMatrix::getInputCount ( ) const
inline

Return the current number of input channels for this channel mix matrix.

void om::sound::base::ChannelMixMatrix::setInputCount ( Size  newNumInputChannels)
inline

Set the number of input channels that this channel mix matrix should have.

This method reallocates the internal gain matrix if necessary and causes the values of all previously stored gain values to become undefined.

Size om::sound::base::ChannelMixMatrix::getOutputCount ( ) const
inline

Return the current number of output channels for this channel mix matrix.

void om::sound::base::ChannelMixMatrix::setOutputCount ( Size  newNumOutputChannels)
inline

Set the number of output channels that this channel mix matrix should have.

This method reallocates the internal gain matrix if necessary and causes the values of all previously stored gain values to become undefined.

void om::sound::base::ChannelMixMatrix::setSize ( Size  newNumInputChannels,
Size  newNumOutputChannels 
)
inline

Set the number of input and output channels that this channel mix matrix should have.

This method reallocates the internal gain matrix if necessary and causes the values of all previously stored gain values to become undefined.

Gain om::sound::base::ChannelMixMatrix::getGain ( Index  inputChannelIndex,
Index  outputChannelIndex 
) const
inline

Return the linear gain associated with the input and output channels at the specified indices.

void om::sound::base::ChannelMixMatrix::setGain ( Index  inputChannelIndex,
Index  outputChannelIndex,
Gain  newGain 
)
inline

Set the linear gain associated with the input and output channels at the specified indices.

void om::sound::base::ChannelMixMatrix::setGains ( Gain  newGain)
inline

Set every input-to-output channel pair to have the specified linear gain value.

void om::sound::base::ChannelMixMatrix::zero ( )

Set every gain in the channel mix matrix to be 0.


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