Ardour
9.0-pre0-582-g084a23a80d
|
#include <chan_mapping.h>
Public Types | |
typedef std::map< uint32_t, uint32_t, std::less< uint32_t >, PBD::StackAllocator< std::pair< const uint32_t, uint32_t >, 16 > > | TypeMapping |
typedef std::map< DataType, TypeMapping, std::less< DataType >, PBD::StackAllocator< std::pair< const DataType, TypeMapping >, 2 > > | Mappings |
Public Member Functions | |
ChanMapping () | |
ChanMapping (ARDOUR::ChanCount identity) | |
ChanMapping (const ChanMapping &) | |
ChanMapping (const XMLNode &node) | |
ChanMapping | operator= (const ChanMapping &) |
uint32_t | get (DataType t, uint32_t from, bool *valid) const |
uint32_t | get_src (DataType type, uint32_t to, bool *valid) const |
uint32_t | get (DataType type, uint32_t from) const |
void | set (DataType type, uint32_t from, uint32_t to) |
void | offset_from (DataType t, int32_t delta) |
void | offset_to (DataType t, int32_t delta) |
void | unset (DataType type, uint32_t from) |
bool | is_identity (ARDOUR::ChanCount offset=ARDOUR::ChanCount()) const |
bool | is_monotonic () const |
uint32_t | n_total () const |
ChanCount | count () const |
XMLNode * | state (const std::string &name) const |
bool | is_subset (const ChanMapping &superset) const |
Mappings | mappings () |
const Mappings & | mappings () const |
bool | operator== (const ChanMapping &other) const |
bool | operator!= (const ChanMapping &other) const |
Private Attributes | |
Mappings | _mappings |
A mapping from one set of channels to another. The general form is 1 source (from), many sinks (to). numeric IDs are used to identify sources and sinks.
for plugins this is used to map "plugin-pin" to "audio-buffer"
Definition at line 41 of file chan_mapping.h.
typedef std::map<DataType, TypeMapping, std::less<DataType>, PBD::StackAllocator<std::pair<const DataType, TypeMapping>, 2> > ARDOUR::ChanMapping::Mappings |
Definition at line 132 of file chan_mapping.h.
typedef std::map<uint32_t, uint32_t, std::less<uint32_t>, PBD::StackAllocator<std::pair<const uint32_t, uint32_t>, 16> > ARDOUR::ChanMapping::TypeMapping |
Definition at line 131 of file chan_mapping.h.
|
inline |
Definition at line 43 of file chan_mapping.h.
ARDOUR::ChanMapping::ChanMapping | ( | ARDOUR::ChanCount | identity | ) |
ARDOUR::ChanMapping::ChanMapping | ( | const ChanMapping & | ) |
ARDOUR::ChanMapping::ChanMapping | ( | const XMLNode & | node | ) |
ChanCount ARDOUR::ChanMapping::count | ( | ) | const |
uint32_t ARDOUR::ChanMapping::get | ( | DataType | t, |
uint32_t | from, | ||
bool * | valid | ||
) | const |
|
inline |
get buffer mapping for given data type and pin
type | data type |
from | numeric source id |
Definition at line 65 of file chan_mapping.h.
uint32_t ARDOUR::ChanMapping::get_src | ( | DataType | type, |
uint32_t | to, | ||
bool * | valid | ||
) | const |
reverse lookup
type | data type |
to | pin |
valid | pointer to a boolean. If not NULL it is set to true if the mapping is found, and false otherwise. |
bool ARDOUR::ChanMapping::is_identity | ( | ARDOUR::ChanCount | offset = ARDOUR::ChanCount() | ) | const |
Test mapping matrix for identity
offset | per data-type offset to take into account |
bool ARDOUR::ChanMapping::is_monotonic | ( | ) | const |
Test if this mapping is monotonic (useful to see if inplace processing is feasible)
bool ARDOUR::ChanMapping::is_subset | ( | const ChanMapping & | superset | ) | const |
Test if this mapping is a subset
superset | to test against |
|
inline |
Definition at line 135 of file chan_mapping.h.
|
inline |
Definition at line 136 of file chan_mapping.h.
uint32_t ARDOUR::ChanMapping::n_total | ( | ) | const |
void ARDOUR::ChanMapping::offset_from | ( | DataType | t, |
int32_t | delta | ||
) |
void ARDOUR::ChanMapping::offset_to | ( | DataType | t, |
int32_t | delta | ||
) |
|
inline |
Definition at line 142 of file chan_mapping.h.
ChanMapping ARDOUR::ChanMapping::operator= | ( | const ChanMapping & | ) |
|
inline |
Definition at line 138 of file chan_mapping.h.
void ARDOUR::ChanMapping::set | ( | DataType | type, |
uint32_t | from, | ||
uint32_t | to | ||
) |
set buffer mapping for given data type
type | data type |
from | numeric source id |
to | buffer |
XMLNode* ARDOUR::ChanMapping::state | ( | const std::string & | name | ) | const |
void ARDOUR::ChanMapping::unset | ( | DataType | type, |
uint32_t | from | ||
) |
remove mapping
type | data type |
from | numeric source to remove from mapping |
|
private |
Definition at line 147 of file chan_mapping.h.