closing in on pin management.
[ardour.git] / libs / ardour / ardour / chan_count.h
index 03e2fcd8fff58b27685f81710dd188381be959a4..fc76734817ce1b6f52fbc34f686bf900ddccdaf1 100644 (file)
@@ -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__