#include "time_axis_view.h"
#include "public_editor.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace Gtk;
class RouteIOsComparator {
public:
bool operator() (RouteIOs const & a, RouteIOs const & b) {
- return a.route->order_key () < b.route->order_key ();
+ return a.route->presentation_info ().order() < b.route->presentation_info().order();
}
};
*/
for (list<RouteIOs>::iterator i = route_ios.begin(); i != route_ios.end(); ++i) {
- TimeAxisView* tv = PublicEditor::instance().axis_view_from_route (i->route);
+ TimeAxisView* tv = PublicEditor::instance().axis_view_from_stripable (i->route);
/* Work out which group to put these IOs' bundles in */
boost::shared_ptr<PortGroup> g;
/* our control surfaces */
- ControlProtocolManager& m = ControlProtocolManager::instance ();
- for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
- if ((*i)->protocol) {
- list<boost::shared_ptr<Bundle> > b = (*i)->protocol->bundles ();
- for (list<boost::shared_ptr<Bundle> >::iterator j = b.begin(); j != b.end(); ++j) {
- if ((*j)->ports_are_inputs() == inputs) {
- program->add_bundle (*j);
+ /* XXX assume for now that all control protocols with ports use
+ * MIDI. If anyone created a control protocol that used audio ports,
+ * this will break.
+ */
+
+ if ((type == DataType::MIDI || type == DataType::NIL)) {
+ ControlProtocolManager& m = ControlProtocolManager::instance ();
+ for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
+ if ((*i)->protocol) {
+ list<boost::shared_ptr<Bundle> > b = (*i)->protocol->bundles ();
+ for (list<boost::shared_ptr<Bundle> >::iterator j = b.begin(); j != b.end(); ++j) {
+ if ((*j)->ports_are_inputs() == inputs) {
+ program->add_bundle (*j);
+ }
}
}
}
lpnc += ':';
vector<string> ports;
- if (AudioEngine::instance()->get_ports ("", type, inputs ? IsInput : IsOutput, ports) > 0) {
+ if (type == DataType::NIL) {
+ vector<string> p1;
+ AudioEngine::instance()->get_ports ("", DataType::AUDIO, inputs ? IsInput : IsOutput, ports);
+ AudioEngine::instance()->get_ports ("", DataType::MIDI, inputs ? IsInput : IsOutput, p1);
+ for (vector<string>::const_iterator s = p1.begin(); s != p1.end(); ++s) {
+ ports.push_back (*s);
+ }
+ } else {
+ AudioEngine::instance()->get_ports ("", type, inputs ? IsInput : IsOutput, ports);
+ }
+
+ if (ports.size () > 0) {
for (vector<string>::const_iterator s = ports.begin(); s != ports.end(); ) {