Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Channel mapping matrix. More...
#include <channel_mapper_matrix.h>
Public Member Functions | |
void | build (const ChannelSet &in_chans, const ChannelSet &out_chans) |
Build matrix. More... | |
sample_t | coeff (size_t out_index, size_t in_index) const |
Returns coefficient for a pair of input and output indices. More... | |
Channel mapping matrix.
Used for mapping between two surround layouts. Not used if one or both layouts are multitrack.
In surround mapping, every output channel is calculated as a sum of every input channel multiplied by a coefficient from this matrix.
Matrix coefficients are defined for physical channel indices in frame, e.g. coeff(1, 2) defines coefficient for second channel in output frame and third channel in input frame, no matter what is the logical position of the channels (L, R, ...).
This allows to use this matrix not just for mapping between different channel masks, but also for different channel orders, in one operation.
Definition at line 38 of file channel_mapper_matrix.h.
void roc::audio::ChannelMapperMatrix::build | ( | const ChannelSet & | in_chans, |
const ChannelSet & | out_chans | ||
) |
Build matrix.
|
inline |
Returns coefficient for a pair of input and output indices.
out_index
and in_index
define physical channel offsets in audio frame, not their logical positions. Definition at line 55 of file channel_mapper_matrix.h.