Merge remote-tracking branch 'remotes/origin/exportvis' into windows+cc
[ardour.git] / libs / ardour / ardour / chan_count.h
index 5903a2f2d56f335337d07c2df2623ed187f03b60..9f9fd07543abcc7045ed69ecea3c674651391219 100644 (file)
 #include "pbd/xml++.h"
 #include "ardour/data_type.h"
 
+#ifdef INFINITE
+#undef INFINITE
+#endif
+
 namespace ARDOUR {
 
 
@@ -34,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(); }
@@ -54,6 +58,8 @@ public:
        void     set(DataType t, uint32_t count) { assert(t != DataType::NIL); _counts[t] = count; }
        uint32_t get(DataType t) const { assert(t != DataType::NIL); return _counts[t]; }
 
+       inline uint32_t n (DataType t) const { return _counts[t]; }
+
        inline uint32_t n_audio() const { return _counts[DataType::AUDIO]; }
        inline void set_audio(uint32_t a) { _counts[DataType::AUDIO] = a; }