}
}
- if (control_out_channels) {
- shared_ptr<Route> r (new Route (*this, _("monitor"), -1, control_out_channels, -1, control_out_channels, Route::ControlOut));
- RouteList rl;
- rl.push_back (r);
- add_routes (rl);
- _control_out = r;
- }
-
- if (master_out_channels) {
- shared_ptr<Route> r (new Route (*this, _("master"), -1, master_out_channels, -1, master_out_channels, Route::MasterOut));
+ {
+ /* set up Master Out and Control Out if necessary */
+
RouteList rl;
- rl.push_back (r);
- add_routes (rl);
- _master_out = r;
- } else {
- /* prohibit auto-connect to master, because there isn't one */
- output_ac = AutoConnectOption (output_ac & ~AutoConnectMaster);
+ int control_id = 1;
+
+ if (control_out_channels) {
+ shared_ptr<Route> r (new Route (*this, _("monitor"), -1, control_out_channels, -1, control_out_channels, Route::ControlOut));
+ r->set_remote_control_id (control_id++);
+
+ rl.push_back (r);
+ }
+
+ if (master_out_channels) {
+ shared_ptr<Route> r (new Route (*this, _("master"), -1, master_out_channels, -1, master_out_channels, Route::MasterOut));
+ r->set_remote_control_id (control_id);
+
+ rl.push_back (r);
+ } else {
+ /* prohibit auto-connect to master, because there isn't one */
+ output_ac = AutoConnectOption (output_ac & ~AutoConnectMaster);
+ }
+
+ if (!rl.empty()) {
+ add_routes (rl);
+ }
+
}
Config->set_input_auto_connect (input_ac);
_state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty);
+ Config->ParameterChanged.connect (mem_fun (*this, &Session::config_changed));
+
if (was_dirty) {
DirtyChanged (); /* EMIT SIGNAL */
}
_engine.get_physical_outputs (physoutputs);
_engine.get_physical_inputs (physinputs);
- control_id = 0;
+ control_id = ntracks() + nbusses() + 1;
while (how_many) {
}
track->DiskstreamChanged.connect (mem_fun (this, &Session::resort_routes));
- track->set_remote_control_id (ntracks() + control_id + 1);
+ track->set_remote_control_id (control_id);
++control_id;
new_routes.push_back (track);
uint32_t n = 0;
string port;
RouteList ret;
+ uint32_t control_id;
/* count existing audio busses */
_engine.get_physical_outputs (physoutputs);
_engine.get_physical_inputs (physinputs);
+ control_id = ntracks() + nbusses() + 1;
while (how_many) {
bus->set_control_outs (cports);
}
+ bus->set_remote_control_id (control_id);
+ ++control_id;
+
ret.push_back (bus);
}
named_selections.insert (named_selections.begin(), named_selection);
}
+ for (list<boost::shared_ptr<Playlist> >::iterator i = named_selection->playlists.begin(); i != named_selection->playlists.end(); ++i) {
+ add_playlist (*i);
+ }
+
set_dirty();
- NamedSelectionAdded (); /* EMIT SIGNAL */
+ NamedSelectionAdded (); /* EMIT SIGNAL */
}
void