From 35c7274cc96a04f166df78249e66ae4a32a53a66 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 3 Apr 2017 23:36:12 +0200 Subject: remove Diskstream from Track and derivatives; get ardour to actually startup --- libs/ardour/session_state.cc | 60 +++++++------------------------------------- 1 file changed, 9 insertions(+), 51 deletions(-) (limited to 'libs/ardour/session_state.cc') diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c818943e1d..1f6645bae8 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1610,15 +1610,6 @@ Session::set_state (const XMLNode& node, int version) } } - if (version < 3000) { - if ((child = find_named_node (node, X_("DiskStreams"))) == 0) { - error << _("Session: XML state has no diskstreams section") << endmsg; - goto out; - } else if (load_diskstreams_2X (*child, version)) { - goto out; - } - } - if ((child = find_named_node (node, VCAManager::xml_node_name)) != 0) { _vca_manager->set_state (*child, version); } @@ -1634,9 +1625,6 @@ Session::set_state (const XMLNode& node, int version) Slavable::Assign (_vca_manager); /* EMIT SIGNAL */ - /* our diskstreams list is no longer needed as they are now all owned by their Route */ - _diskstreams_2X.clear (); - if (version >= 3000) { if ((child = find_named_node (node, "RouteGroups")) == 0) { @@ -1757,14 +1745,18 @@ Session::XMLRouteFactory (const XMLNode& node, int version) return ret; } - XMLNode* ds_child = find_named_node (node, X_("Diskstream")); + XMLNode* pl_child = find_named_node (node, X_("audio-playlist")); + + if (!pl_child) { + pl_child = find_named_node (node, X_("midi-playlist")); + } DataType type = DataType::AUDIO; node.get_property("default-type", type); assert (type != DataType::NIL); - if (ds_child) { + if (pl_child) { boost::shared_ptr track; @@ -1819,15 +1811,10 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version) if (ds_prop) { - list >::iterator i = _diskstreams_2X.begin (); - while (i != _diskstreams_2X.end() && (*i)->id() != ds_prop->value()) { - ++i; - } + // XXX DISK .... how to load 2.x diskstreams ? - if (i == _diskstreams_2X.end()) { - error << _("Could not find diskstream for route") << endmsg; - return boost::shared_ptr (); - } + error << _("Could not find diskstream for route") << endmsg; + return boost::shared_ptr (); boost::shared_ptr track; @@ -4180,35 +4167,6 @@ Session::set_history_depth (uint32_t d) _history.set_depth (d); } -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 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 () -- cgit v1.2.3