X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fchan_count.h;h=fc76734817ce1b6f52fbc34f686bf900ddccdaf1;hb=c444105710cc540d3d6a14c9cf710f1e14fdbe26;hp=03e2fcd8fff58b27685f81710dd188381be959a4;hpb=5cf1f7f3b28abd36f9390014016def94f4e1468d;p=ardour.git diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index 03e2fcd8ff..fc76734817 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -38,7 +38,7 @@ namespace ARDOUR { * Operators are defined so this may safely be used as if it were a simple * (single-typed) integer count of channels. */ -class ChanCount { +class LIBARDOUR_API ChanCount { public: ChanCount(const XMLNode& node); ChanCount() { reset(); } @@ -120,6 +120,14 @@ public: return ret; } + ChanCount operator*(const unsigned int factor) const { + ChanCount ret; + for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { + ret.set(*t, get(*t) * factor ); + } + return ret; + } + ChanCount& operator+=(const ChanCount& other) { for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { _counts[*t] += other._counts[*t]; @@ -154,7 +162,7 @@ private: } // namespace ARDOUR -std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanCount& c); +LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanCount& c); #endif // __ardour_chan_count_h__