diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-01 22:54:00 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-01 22:57:56 +0200 |
commit | c25962aa7ed14573de1f7839b00bf67bc9e7e03f (patch) | |
tree | 6cea07d02c16f8fe1c03308f90347f86faacbbbd /libs/ardour/chan_mapping.cc | |
parent | 91c7845d409665e54d78c9325c36aa8926b82669 (diff) |
add chan-mapping count/size()
Diffstat (limited to 'libs/ardour/chan_mapping.cc')
-rw-r--r-- | libs/ardour/chan_mapping.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/chan_mapping.cc b/libs/ardour/chan_mapping.cc index 6386c2863b..9e69294fdb 100644 --- a/libs/ardour/chan_mapping.cc +++ b/libs/ardour/chan_mapping.cc @@ -184,6 +184,17 @@ ChanMapping::is_identity (ChanCount offset) const 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 std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanMapping& cm) |