*/
bool is_monotonic () const;
- uint32_t count () const;
+ uint32_t n_total () const;
+
+ ChanCount count () const;
XMLNode* state(const std::string& name) const;
}
uint32_t
-ChanMapping::count () const
+ChanMapping::n_total () const
{
+ // fast version of count().n_total();
uint32_t rv = 0;
const Mappings& mp (mappings());
for (Mappings::const_iterator tm = mp.begin(); tm != mp.end(); ++tm) {
return rv;
}
+ChanCount
+ChanMapping::count () const
+{
+ ChanCount rv;
+ const Mappings& mp (mappings());
+ for (Mappings::const_iterator tm = mp.begin(); tm != mp.end(); ++tm) {
+ rv.set (tm->first, tm->second.size ());
+ }
+ return rv;
+}
+
+
+
} // namespace ARDOUR
std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanMapping& cm)
{
bool inplace_ok = !_plugins.front()->inplace_broken ();
- if (_thru_map.count () > 0) {
+ if (_thru_map.n_total () > 0) {
// TODO once midi-bypass is part of the mapping, ignore it
inplace_ok = false;
}