add chan-mapping count/size()
This commit is contained in:
parent
91c7845d40
commit
c25962aa7e
@ -86,6 +86,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool is_monotonic () const;
|
bool is_monotonic () const;
|
||||||
|
|
||||||
|
uint32_t count () const;
|
||||||
|
|
||||||
/** Test if this mapping is a subset
|
/** Test if this mapping is a subset
|
||||||
* @param superset to test against
|
* @param superset to test against
|
||||||
* @returns true if all mapping are also present in the superset
|
* @returns true if all mapping are also present in the superset
|
||||||
|
@ -184,6 +184,17 @@ ChanMapping::is_identity (ChanCount offset) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
ChanMapping::count () const
|
||||||
|
{
|
||||||
|
uint32_t rv = 0;
|
||||||
|
const Mappings& mp (mappings());
|
||||||
|
for (Mappings::const_iterator tm = mp.begin(); tm != mp.end(); ++tm) {
|
||||||
|
rv += tm->second.size ();
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanMapping& cm)
|
std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanMapping& cm)
|
||||||
|
Loading…
Reference in New Issue
Block a user