new port design, probably about 90% done (i.e it mostly works and this commit is...
[ardour.git] / libs / ardour / source.cc
index 21cd871cbf0e48eabb21a29a9e93ffadf302c8dc..a11e82f1e81b245e912ca9f3e2a1439ee2fbd71c 100644 (file)
@@ -42,20 +42,20 @@ using std::max;
 
 using namespace ARDOUR;
 
-Source::Source (Session& s, string name, DataType type)
-       : _session (s)
+Source::Source (Session& s, const string& name, DataType type)
+       : SessionObject(s, name)
        , _type(type)
 {
-       assert(_name.find("/") == string::npos);
+       // not true.. is this supposed to be an assertion?
+       //assert(_name.find("/") == string::npos);
 
-       _name = name;
        _timestamp = 0;
        _length = 0;
        _in_use = 0;
 }
 
 Source::Source (Session& s, const XMLNode& node) 
-       : _session (s)
+       : SessionObject(s, "unnamed source")
        , _type(DataType::AUDIO)
 {
        _timestamp = 0;
@@ -65,7 +65,6 @@ Source::Source (Session& s, const XMLNode& node)
        if (set_state (node) || _type == DataType::NIL) {
                throw failed_constructor();
        }
-       assert(_name.find("/") == string::npos);
 }
 
 Source::~Source ()
@@ -116,7 +115,9 @@ Source::set_state (const XMLNode& node)
        if ((prop = node.property ("timestamp")) != 0) {
                sscanf (prop->value().c_str(), "%ld", &_timestamp);
        }
-       assert(_name.find("/") == string::npos);
+       
+       // Don't think this is valid, absolute paths fail
+       //assert(_name.find("/") == string::npos);
 
        return 0;
 }