add API to Evoral::SMF to retrieve all track/instrument names for use when importing
[ardour.git] / libs / ardour / export_format_specification.cc
index 6183d0d2bf6fcffcaf22d0f2a3d6c6d66d943eac..7ed52a80e8c2b83ef2bb0972dc50fb892006f304 100644 (file)
@@ -31,7 +31,7 @@
 #include "pbd/enumwriter.h"
 #include "pbd/convert.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 namespace ARDOUR
 {
@@ -272,6 +272,7 @@ ExportFormatSpecification::~ExportFormatSpecification ()
 XMLNode &
 ExportFormatSpecification::get_state ()
 {
+       LocaleGuard lg;
        XMLNode * node;
        XMLNode * root = new XMLNode ("ExportFormatSpecification");
 
@@ -281,6 +282,8 @@ ExportFormatSpecification::get_state ()
        root->add_property ("with-toc", _with_toc ? "true" : "false");
        root->add_property ("with-mp4chaps", _with_mp4chaps ? "true" : "false");
        root->add_property ("command", _command);
+       root->add_property ("analyse", _analyse ? "true" : "false");
+       root->add_property ("soundcloud-upload", _soundcloud_upload ? "true" : "false");
 
        node = root->add_child ("Encoding");
        node->add_property ("id", enum_2_string (format_id()));
@@ -340,6 +343,7 @@ ExportFormatSpecification::set_state (const XMLNode & root)
        XMLProperty const * prop;
        XMLNode const * child;
        string value;
+       LocaleGuard lg;
 
        if ((prop = root.property ("name"))) {
                _name = prop->value();
@@ -373,6 +377,18 @@ ExportFormatSpecification::set_state (const XMLNode & root)
                _command = "";
        }
 
+       if ((prop = root.property ("analyse"))) {
+               _analyse = string_is_affirmative (prop->value());
+       } else {
+               _analyse = false;
+       }
+
+       if ((prop = root.property ("soundcloud-upload"))) {
+               _soundcloud_upload = string_is_affirmative (prop->value());
+       } else {
+               _soundcloud_upload = false;
+       }
+
        /* Encoding and SRC */
 
        if ((child = root.child ("Encoding"))) {