- uint32_t const ni = _ports.num_ports();
- for (uint32_t i = 0; i < ni; ++i) {
- _bundle->add_channel (bundle_channel_name (i, ni));
- _bundle->set_port (i, _session.engine().make_port_name_non_relative (_ports.port(i)->name()));
+
+ int c = 0;
+ for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
+
+ uint32_t const N = _ports.count().get (*i);
+ for (uint32_t j = 0; j < N; ++j) {
+ _bundle->add_channel (bundle_channel_name (j, N, *i), *i);
+ _bundle->set_port (c, _session.engine().make_port_name_non_relative (_ports.port(*i, j)->name()));
+ ++c;
+ }
+