2 Copyright (C) 1999 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __ardour_configuration_h__
22 #define __ardour_configuration_h__
26 #include <sys/types.h>
29 #include <ardour/types.h>
30 #include <ardour/stateful.h>
38 class Configuration : public Stateful
42 virtual ~Configuration();
44 struct MidiPortDescriptor {
50 MidiPortDescriptor (const XMLNode&);
54 std::map<string,MidiPortDescriptor *> midi_ports;
59 XMLNode& option_node (const string &, const string &);
61 int set_state (const XMLNode&);
62 XMLNode& get_state (void);
64 XMLNode * get_keys() const;
65 void set_keys(XMLNode *);
67 void set_latched_record_enable (bool yn);
68 bool get_latched_record_enable();
70 void set_use_vst (bool yn);
73 bool get_trace_midi_input ();
74 void set_trace_midi_input (bool);
76 bool get_trace_midi_output ();
77 void set_trace_midi_output (bool);
79 string get_raid_path();
80 void set_raid_path(string);
82 uint32_t get_minimum_disk_io();
83 void set_minimum_disk_io(uint32_t);
85 float get_track_buffer();
86 void set_track_buffer(float);
88 bool does_hiding_groups_deactivates_groups();
89 void set_hiding_groups_deactivates_groups(bool);
91 string get_auditioner_output_left();
92 void set_auditioner_output_left(string);
94 string get_auditioner_output_right();
95 void set_auditioner_output_right(string);
97 bool get_mute_affects_pre_fader();
98 void set_mute_affects_pre_fader (bool);
100 bool get_mute_affects_post_fader();
101 void set_mute_affects_post_fader (bool);
103 bool get_mute_affects_control_outs ();
104 void set_mute_affects_control_outs (bool);
106 bool get_mute_affects_main_outs ();
107 void set_mute_affects_main_outs (bool);
109 bool get_solo_latch ();
110 void set_solo_latch (bool);
112 uint32_t get_disk_choice_space_threshold();
113 void set_disk_choice_space_threshold (uint32_t);
115 string get_mmc_port_name();
116 void set_mmc_port_name(string);
118 string get_mtc_port_name();
119 void set_mtc_port_name(string);
121 string get_midi_port_name();
122 void set_midi_port_name(string);
124 uint32_t get_midi_feedback_interval_ms();
125 void set_midi_feedback_interval_ms (uint32_t);
127 bool get_use_hardware_monitoring();
128 void set_use_hardware_monitoring(bool);
130 bool get_use_sw_monitoring();
131 void set_use_sw_monitoring(bool);
133 bool get_jack_time_master();
134 void set_jack_time_master(bool);
136 bool get_native_format_is_bwf();
137 void set_native_format_is_bwf(bool);
139 bool get_plugins_stop_with_transport();
140 void set_plugins_stop_with_transport(bool);
142 bool get_stop_recording_on_xrun();
143 void set_stop_recording_on_xrun(bool);
145 bool get_verify_remove_last_capture();
146 void set_verify_remove_last_capture(bool);
148 bool get_stop_at_session_end();
149 void set_stop_at_session_end(bool);
151 bool get_seamless_looping();
152 void set_seamless_looping(bool);
154 bool get_auto_xfade();
155 void set_auto_xfade (bool);
157 bool get_no_new_session_dialog();
158 void set_no_new_session_dialog(bool);
160 uint32_t get_timecode_skip_limit ();
161 void set_timecode_skip_limit (uint32_t);
163 bool get_timecode_source_is_synced ();
164 void set_timecode_source_is_synced (bool);
166 string get_user_ardour_path ();
167 string get_system_ardour_path ();
169 gain_t get_quieten_at_speed ();
170 void set_quieten_at_speed (gain_t);
173 void set_defaults ();
174 string get_system_path();
175 string get_user_path();
177 /* this is subject to wordexp, so we need
178 to keep the original (user-entered) form
179 around. e.g. ~/blah-> /home/foo/blah
183 bool raid_path_is_user;
184 string orig_raid_path;
186 uint32_t minimum_disk_io_bytes;
187 bool minimum_disk_io_bytes_is_user;
188 float track_buffer_seconds;
189 bool track_buffer_seconds_is_user;
190 bool hiding_groups_deactivates_groups;
191 bool hiding_groups_deactivates_groups_is_user;
192 string auditioner_output_left;
193 bool auditioner_output_left_is_user;
194 string auditioner_output_right;
195 bool auditioner_output_right_is_user;
196 bool mute_affects_pre_fader;
197 bool mute_affects_pre_fader_is_user;
198 bool mute_affects_post_fader;
199 bool mute_affects_post_fader_is_user;
200 bool mute_affects_control_outs;
201 bool mute_affects_control_outs_is_user;
202 bool mute_affects_main_outs;
203 bool mute_affects_main_outs_is_user;
205 bool solo_latch_is_user;
206 uint32_t disk_choice_space_threshold;
207 bool disk_choice_space_threshold_is_user;
208 string mtc_port_name;
209 bool mtc_port_name_is_user;
210 string mmc_port_name;
211 bool mmc_port_name_is_user;
212 string midi_port_name;
213 bool midi_port_name_is_user;
214 bool use_hardware_monitoring;
215 bool use_hardware_monitoring_is_user;
216 bool be_jack_time_master;
217 bool be_jack_time_master_is_user;
218 bool native_format_is_bwf;
219 bool native_format_is_bwf_is_user;
220 bool trace_midi_input;
221 bool trace_midi_input_is_user;
222 bool trace_midi_output;
223 bool trace_midi_output_is_user;
224 bool plugins_stop_with_transport;
225 bool plugins_stop_with_transport_is_user;
226 bool use_sw_monitoring;
227 bool use_sw_monitoring_is_user;
228 bool stop_recording_on_xrun;
229 bool stop_recording_on_xrun_is_user;
230 bool verify_remove_last_capture;
231 bool verify_remove_last_capture_is_user;
232 bool stop_at_session_end;
233 bool stop_at_session_end_is_user;
234 bool seamless_looping;
235 bool seamless_looping_is_user;
237 bool auto_xfade_is_user;
238 bool no_new_session_dialog;
239 bool no_new_session_dialog_is_user;
240 uint32_t timecode_skip_limit;
241 bool timecode_skip_limit_is_user;
242 bool timecode_source_is_synced;
243 bool timecode_source_is_synced_is_user;
244 bool use_vst; /* always per-user */
245 bool quieten_at_speed;
246 bool quieten_at_speed_is_user;
247 uint32_t midi_feedback_interval_ms;
248 bool midi_feedback_interval_ms_is_user;
249 bool latched_record_enable;
250 bool latched_record_enable_is_user;
253 bool user_configuration;
255 XMLNode& state (bool user_only);
258 extern Configuration *Config;
259 extern gain_t speed_quietning; /* see comment in configuration.cc */
261 }; /* namespace ARDOUR */
263 #endif /* __ardour_configuration_h__ */