no-read-past-end for destructive crossfade as well; cleanup xfade coefficient arrays...
[ardour.git] / libs / ardour / configuration.cc
index 0de30a3538fe2215efa945ef1b4e7e3d6424bb9b..3b4ad4b45f54bdea5506a4bec9718e587d03276b 100644 (file)
@@ -257,8 +257,8 @@ Configuration::state (bool user_only)
        if (!user_only || plugins_stop_with_transport_is_user) {
                node->add_child_nocopy(option_node("plugins-stop-with-transport", plugins_stop_with_transport?"yes":"no"));
        }
-       if (!user_only || no_sw_monitoring_is_user) {
-               node->add_child_nocopy(option_node("no-sw-monitoring", no_sw_monitoring?"yes":"no"));
+       if (!user_only || use_sw_monitoring_is_user) {
+               node->add_child_nocopy(option_node("use-sw-monitoring", use_sw_monitoring?"yes":"no"));
        }
        if (!user_only || stop_recording_on_xrun_is_user) {
                node->add_child_nocopy(option_node("stop-recording-on-xrun", stop_recording_on_xrun?"yes":"no"));
@@ -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"));
@@ -400,8 +408,10 @@ Configuration::set_state (const XMLNode& root)
                                        set_trace_midi_output (option_value == "yes");
                                } else if (option_name == "plugins-stop-with-transport") {
                                        set_plugins_stop_with_transport (option_value == "yes");
-                               } else if (option_name == "no-sw-monitoring") {
-                                       set_no_sw_monitoring (option_value == "yes");
+                               } else if (option_name == "use-sw-monitoring") {
+                                       set_use_sw_monitoring (option_value == "yes");
+                               } else if (option_name == "no-sw-monitoring") {     /* DEPRECATED */
+                                       set_use_sw_monitoring (option_value != "yes");
                                } else if (option_name == "stop-recording-on-xrun") {
                                        set_stop_recording_on_xrun (option_value == "yes");
                                } else if (option_name == "verify-remove-last-capture") {
@@ -429,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);
                                }
                        }
                        
@@ -475,7 +489,7 @@ Configuration::set_defaults ()
        trace_midi_input = false;
        trace_midi_output = false;
        plugins_stop_with_transport = false;
-       no_sw_monitoring = false;
+       use_sw_monitoring = true;
        stop_recording_on_xrun = false;
        verify_remove_last_capture = true;
        stop_at_session_end = true;
@@ -485,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;
        
@@ -514,7 +529,7 @@ Configuration::set_defaults ()
        trace_midi_input_is_user = false;
        trace_midi_output_is_user = false;
        plugins_stop_with_transport_is_user = false;
-       no_sw_monitoring_is_user = false;
+       use_sw_monitoring_is_user = false;
        stop_recording_on_xrun_is_user = false;
        verify_remove_last_capture_is_user = false;
        stop_at_session_end_is_user = false;
@@ -524,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)
@@ -948,17 +965,17 @@ Configuration::set_plugins_stop_with_transport (bool yn)
 }
 
 bool
-Configuration::get_no_sw_monitoring ()
+Configuration::get_use_sw_monitoring ()
 {
-       return no_sw_monitoring;
+       return use_sw_monitoring;
 }
 
 void
-Configuration::set_no_sw_monitoring (bool yn)
+Configuration::set_use_sw_monitoring (bool yn)
 {
-       no_sw_monitoring = yn;
+       use_sw_monitoring = yn;
        if (user_configuration) {
-               no_sw_monitoring_is_user = true;
+               use_sw_monitoring_is_user = true;
        }
 }
 
@@ -1128,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;
+}