+
+int
+Session::load_diskstreams_2X (XMLNode const & node, int)
+{
+ XMLNodeList clist;
+ XMLNodeConstIterator citer;
+
+ clist = node.children();
+
+ for (citer = clist.begin(); citer != clist.end(); ++citer) {
+
+ try {
+ /* diskstreams added automatically by DiskstreamCreated handler */
+ if ((*citer)->name() == "AudioDiskstream" || (*citer)->name() == "DiskStream") {
+ boost::shared_ptr<AudioDiskstream> dsp (new AudioDiskstream (*this, **citer));
+ _diskstreams_2X.push_back (dsp);
+ } else {
+ error << _("Session: unknown diskstream type in XML") << endmsg;
+ }
+ }
+
+ catch (failed_constructor& err) {
+ error << _("Session: could not load diskstream via XML state") << endmsg;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/** Connect things to the MMC object */
+void
+Session::setup_midi_machine_control ()
+{
+ MIDI::MachineControl* mmc = MIDI::Manager::instance()->mmc ();
+
+ mmc->Play.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1));
+ mmc->DeferredPlay.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1));
+ mmc->Stop.connect_same_thread (*this, boost::bind (&Session::mmc_stop, this, _1));
+ mmc->FastForward.connect_same_thread (*this, boost::bind (&Session::mmc_fast_forward, this, _1));
+ mmc->Rewind.connect_same_thread (*this, boost::bind (&Session::mmc_rewind, this, _1));
+ mmc->Pause.connect_same_thread (*this, boost::bind (&Session::mmc_pause, this, _1));
+ mmc->RecordPause.connect_same_thread (*this, boost::bind (&Session::mmc_record_pause, this, _1));
+ mmc->RecordStrobe.connect_same_thread (*this, boost::bind (&Session::mmc_record_strobe, this, _1));
+ mmc->RecordExit.connect_same_thread (*this, boost::bind (&Session::mmc_record_exit, this, _1));
+ mmc->Locate.connect_same_thread (*this, boost::bind (&Session::mmc_locate, this, _1, _2));
+ mmc->Step.connect_same_thread (*this, boost::bind (&Session::mmc_step, this, _1, _2));
+ mmc->Shuttle.connect_same_thread (*this, boost::bind (&Session::mmc_shuttle, this, _1, _2, _3));
+ mmc->TrackRecordStatusChange.connect_same_thread (*this, boost::bind (&Session::mmc_record_enable, this, _1, _2, _3));
+
+ /* also handle MIDI SPP because its so common */
+
+ mmc->SPPStart.connect_same_thread (*this, boost::bind (&Session::spp_start, this, _1, _2));
+ mmc->SPPContinue.connect_same_thread (*this, boost::bind (&Session::spp_continue, this, _1, _2));
+ mmc->SPPStop.connect_same_thread (*this, boost::bind (&Session::spp_stop, this, _1, _2));
+}
+
+boost::shared_ptr<Controllable>
+Session::solo_cut_control() const
+{
+ /* the solo cut control is a bit of an anomaly, at least as of Febrary 2011. There are no other
+ controls in Ardour that currently get presented to the user in the GUI that require
+ access as a Controllable and are also NOT owned by some SessionObject (e.g. Route, or MonitorProcessor).
+
+ its actually an RCConfiguration parameter, so we use a ProxyControllable to wrap
+ it up as a Controllable. Changes to the Controllable will just map back to the RCConfiguration
+ parameter.
+ */
+
+ return _solo_cut_control;
+}