summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/bundle.h4
-rw-r--r--libs/ardour/bundle.cc15
2 files changed, 17 insertions, 2 deletions
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h
index 369b12ec9b..e3d56f22f5 100644
--- a/libs/ardour/ardour/bundle.h
+++ b/libs/ardour/ardour/bundle.h
@@ -144,8 +144,6 @@ class Bundle : public PBD::ScopedConnectionList
Change _pending_change;
};
-
-
struct BundleChannel
{
BundleChannel () : channel (-1) {}
@@ -167,4 +165,6 @@ struct BundleChannel
}
+std::ostream & operator<< (std::ostream & o, ARDOUR::Bundle const &);
+
#endif /* __ardour_bundle_h__ */
diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc
index 6037bfc7e9..e42239a1ea 100644
--- a/libs/ardour/bundle.cc
+++ b/libs/ardour/bundle.cc
@@ -496,3 +496,18 @@ Bundle::channel_type (uint32_t c) const
return _channel[c].type;
}
+ostream &
+operator<< (ostream& os, Bundle const & b)
+{
+ os << "BUNDLE " << b.nchannels() << " channels: ";
+ for (uint32_t i = 0; i < b.nchannels().n_total(); ++i) {
+ os << "( ";
+ Bundle::PortList const & pl = b.channel_ports (i);
+ for (Bundle::PortList::const_iterator j = pl.begin(); j != pl.end(); ++j) {
+ os << *j << " ";
+ }
+ os << ") ";
+ }
+
+ return os;
+}