grouped faders should have relative gain by default
[ardour.git] / libs / ardour / export_format_specification.cc
index 66deabc6235977dfbf67143ab8bfb02c78fc9aa4..d8a45ba533e47afe81cb8a2b2332347a4d2ce7d2 100644 (file)
@@ -170,6 +170,8 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s)
        , _normalize_target (1.0)
        , _with_toc (false)
        , _with_cue (false)
+       , _soundcloud_upload (false)
+       , _command ("")
 {
        format_ids.insert (F_None);
        endiannesses.insert (E_FileDefault);
@@ -189,13 +191,17 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const
        set_state (state);
 }
 
-ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other)
+ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other, bool modify_name)
        : ExportFormatBase(other)
        , session (other.session)
        , _silence_beginning (other.session)
        , _silence_end (other.session)
 {
-       set_name (other.name() + " (copy)");
+       if (modify_name) {
+               set_name (other.name() + " (copy)");
+       } else {
+               set_name (other.name());
+       }
 
        _format_name = other._format_name;
        has_sample_format = other.has_sample_format;
@@ -240,6 +246,7 @@ ExportFormatSpecification::get_state ()
        root->add_property ("id", _id.to_s());
        root->add_property ("with-cue", _with_cue ? "true" : "false");
        root->add_property ("with-toc", _with_toc ? "true" : "false");
+       root->add_property ("command", _command);
 
        node = root->add_child ("Encoding");
        node->add_property ("id", enum_2_string (format_id()));
@@ -317,6 +324,13 @@ ExportFormatSpecification::set_state (const XMLNode & root)
                _with_toc = false;
        }
        
+       
+       if ((prop = root.property ("command"))) {
+               _command = prop->value();
+       } else {
+               _command = "";
+       }
+
        /* Encoding and SRC */
 
        if ((child = root.child ("Encoding"))) {
@@ -530,15 +544,15 @@ ExportFormatSpecification::description (bool include_name)
        list<string> components;
 
        if (_normalize) {
-               components.push_back (_("normalize"));
+               components.push_back (_("normalize"));
        }
 
        if (_trim_beginning && _trim_end) {
-               components.push_back ( _("trim"));
+               components.push_back ( _("trim"));
        } else if (_trim_beginning) {
-               components.push_back (_("trim start"));
+               components.push_back (_("trim start"));
        } else if (_trim_end) {
-               components.push_back (_("trim end"));
+               components.push_back (_("trim end"));
        }
 
        if (_format_name != "") {
@@ -550,6 +564,9 @@ ExportFormatSpecification::description (bool include_name)
        }
 
        switch (sample_rate()) {
+       case SR_8:
+               components.push_back ("8 kHz");
+               break;
        case SR_22_05:
                components.push_back ("22,5 kHz");
                break;
@@ -583,6 +600,10 @@ ExportFormatSpecification::description (bool include_name)
                components.push_back ("CUE");
        }
 
+       if (!_command.empty()) {
+               components.push_back ("+");
+       }
+
        string desc;
        if (include_name) {
                desc = _name + ": ";