Allow Lua bindings up to 10 args
[ardour.git] / libs / ardour / session_state.cc
index bae1f46d0199a7226a229366d6b34b40c05761c8..ee86a40e09d08f4b0c9cf24560d2c03b3d43d67c 100644 (file)
@@ -3907,11 +3907,13 @@ Session::config_changed (std::string p, bool ours)
 
        } else if (p == "auto-loop") {
 
+       } else if (p == "session-monitoring") {
+
        } else if (p == "auto-input") {
 
                if (Config->get_monitoring_model() == HardwareMonitoring && transport_rolling()) {
                        /* auto-input only makes a difference if we're rolling */
-                        set_track_monitor_input_status (!config.get_auto_input());
+                       set_track_monitor_input_status (!config.get_auto_input());
                }
 
        } else if (p == "punch-in") {
@@ -4426,10 +4428,11 @@ Session::rename (const std::string& new_name)
 }
 
 int
-Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFormat& data_format)
+Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFormat& data_format, std::string& created_version)
 {
        bool found_sr = false;
        bool found_data_format = false;
+       created_version = "";
 
        if (!Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) {
                return -1;
@@ -4450,6 +4453,7 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo
 
        if (node == NULL) {
                xmlFreeParserCtxt(ctxt);
+               xmlFreeDoc (doc);
                return -1;
        }
 
@@ -4465,6 +4469,13 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo
 
        node = node->children;
        while (node != NULL) {
+                if (!strcmp((const char*) node->name, "ProgramVersion")) {
+                        xmlChar* val = xmlGetProp (node, (const xmlChar*)"created-with");
+                        if (val) {
+                                created_version = string ((const char*)val);
+                        }
+                        xmlFree (val);
+                }
                 if (strcmp((const char*) node->name, "Config")) {
                         node = node->next;
                         continue;
@@ -4488,6 +4499,7 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo
        }
 
        xmlFreeParserCtxt(ctxt);
+       xmlFreeDoc (doc);
 
        return !(found_sr && found_data_format); // zero if they are both found
 }