no-read-past-end for destructive crossfade as well; cleanup xfade coefficient arrays...
[ardour.git] / libs / ardour / configuration.cc
index 28f13aabb8442281a361ac5f06f4171379c2b87d..3b4ad4b45f54bdea5506a4bec9718e587d03276b 100644 (file)
@@ -291,6 +291,14 @@ Configuration::state (bool user_only)
                snprintf (buf, sizeof (buf), "%f", speed_quietning);
                node->add_child_nocopy(option_node("quieten-at-speed", buf));
        }
+       if (!user_only || latched_record_enable_is_user) {
+               node->add_child_nocopy(option_node("latched-record-enable", latched_record_enable?"yes":"no"));
+       }
+       if (!user_only || tape_dir_is_user) {
+               if (!tape_dir.empty()) {
+                       node->add_child_nocopy(option_node("tape-dir", tape_dir));
+               }
+       }
 
        /* use-vst is always per-user */
        node->add_child_nocopy (option_node ("use-vst", use_vst?"yes":"no"));
@@ -431,6 +439,10 @@ Configuration::set_state (const XMLNode& root)
                                        }
                                } else if (option_name == "midi-feedback-interval-ms") {
                                        set_midi_feedback_interval_ms (atoi (option_value.c_str()));
+                               } else if (option_name == "latched-record-enable") {
+                                       set_latched_record_enable (option_value == "yes");
+                               } else if (option_name == "tape-dir") {
+                                       set_tape_dir (option_value);
                                }
                        }
                        
@@ -487,6 +499,7 @@ Configuration::set_defaults ()
        timecode_source_is_synced = true;
        use_vst = true; /* if we build with VST_SUPPORT, otherwise no effect */
        quieten_at_speed = true;
+       tape_dir = "";
 
        midi_feedback_interval_ms = 100;
        
@@ -526,6 +539,8 @@ Configuration::set_defaults ()
        timecode_source_is_synced_is_user = false;
        quieten_at_speed_is_user = false;
        midi_feedback_interval_ms_is_user = false;
+       latched_record_enable_is_user = false;
+       tape_dir_is_user = false;
 }
 
 Configuration::MidiPortDescriptor::MidiPortDescriptor (const XMLNode& node)
@@ -1130,3 +1145,30 @@ Configuration::set_quieten_at_speed (float gain_coefficient)
                quieten_at_speed_is_user = true;
        }
 }
+
+void
+Configuration::set_latched_record_enable (bool yn)
+{
+       latched_record_enable = yn;
+       if (user_configuration) {
+               latched_record_enable_is_user = true;
+       }
+}
+
+bool
+Configuration::get_latched_record_enable ()
+{
+       return latched_record_enable;
+}
+
+string
+Configuration::get_tape_dir () 
+{
+       return tape_dir;
+}
+
+void
+Configuration::set_tape_dir (string path)
+{
+       tape_dir = path;
+}