diff options
author | David Robillard <d@drobilla.net> | 2009-05-04 15:50:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-04 15:50:51 +0000 |
commit | ca10cc82a4374a5b413c06ead6cc89c53f8881ee (patch) | |
tree | 3d44716ed02d80bd1256609631c77a730d04e169 /libs/ardour/ardour/chan_count.h | |
parent | 9b06b1da0cec57a6848cf1f7920691ae022b30e7 (diff) |
Preliminary MIDI plugin support.
git-svn-id: svn://localhost/ardour2/branches/3.0@5036 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/chan_count.h')
-rw-r--r-- | libs/ardour/ardour/chan_count.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index ff70be6bb6..fb4b1999ca 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -20,10 +20,10 @@ #ifndef __ardour_chan_count_h__ #define __ardour_chan_count_h__ +#include <cassert> #include <ostream> #include "ardour/data_type.h" -#include <cassert> namespace ARDOUR { @@ -103,6 +103,14 @@ public: bool operator>=(const ChanCount& other) const { return ( (*this > other) || (*this == other) ); } + + static ChanCount max(const ChanCount& a, const ChanCount& b) { + ChanCount ret; + for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { + ret.set(*t, std::max(a.get(*t), b.get(*t))); + } + return ret; + } static const ChanCount INFINITE; static const ChanCount ZERO; |