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_use_vst (bool yn);
70 bool get_trace_midi_input ();
71 void set_trace_midi_input (bool);
73 bool get_trace_midi_output ();
74 void set_trace_midi_output (bool);
76 string get_raid_path();
77 void set_raid_path(string);
79 uint32_t get_minimum_disk_io();
80 void set_minimum_disk_io(uint32_t);
82 float get_track_buffer();
83 void set_track_buffer(float);
85 bool does_hiding_groups_deactivates_groups();
86 void set_hiding_groups_deactivates_groups(bool);
88 string get_auditioner_output_left();
89 void set_auditioner_output_left(string);
91 string get_auditioner_output_right();
92 void set_auditioner_output_right(string);
94 bool get_mute_affects_pre_fader();
95 void set_mute_affects_pre_fader (bool);
97 bool get_mute_affects_post_fader();
98 void set_mute_affects_post_fader (bool);
100 bool get_mute_affects_control_outs ();
101 void set_mute_affects_control_outs (bool);
103 bool get_mute_affects_main_outs ();
104 void set_mute_affects_main_outs (bool);
106 bool get_solo_latch ();
107 void set_solo_latch (bool);
109 uint32_t get_disk_choice_space_threshold();
110 void set_disk_choice_space_threshold (uint32_t);
112 string get_mmc_port_name();
113 void set_mmc_port_name(string);
115 string get_mtc_port_name();
116 void set_mtc_port_name(string);
118 string get_midi_port_name();
119 void set_midi_port_name(string);
121 bool get_use_hardware_monitoring();
122 void set_use_hardware_monitoring(bool);
124 bool get_jack_time_master();
125 void set_jack_time_master(bool);
127 bool get_native_format_is_bwf();
128 void set_native_format_is_bwf(bool);
130 bool get_plugins_stop_with_transport();
131 void set_plugins_stop_with_transport(bool);
133 bool get_no_sw_monitoring();
134 void set_no_sw_monitoring(bool);
136 bool get_stop_recording_on_xrun();
137 void set_stop_recording_on_xrun(bool);
139 bool get_verify_remove_last_capture();
140 void set_verify_remove_last_capture(bool);
142 bool get_stop_at_session_end();
143 void set_stop_at_session_end(bool);
145 bool get_seamless_looping();
146 void set_seamless_looping(bool);
148 bool get_auto_xfade();
149 void set_auto_xfade (bool);
151 bool get_no_new_session_dialog();
152 void set_no_new_session_dialog(bool);
154 uint32_t get_timecode_skip_limit ();
155 void set_timecode_skip_limit (uint32_t);
157 bool get_timecode_source_is_synced ();
158 void set_timecode_source_is_synced (bool);
160 string get_user_ardour_path ();
161 string get_system_ardour_path ();
163 gain_t get_quieten_at_speed ();
164 void set_quieten_at_speed (gain_t);
167 void set_defaults ();
168 string get_system_path();
169 string get_user_path();
171 /* this is subject to wordexp, so we need
172 to keep the original (user-entered) form
173 around. e.g. ~/blah-> /home/foo/blah
177 bool raid_path_is_user;
178 string orig_raid_path;
180 uint32_t minimum_disk_io_bytes;
181 bool minimum_disk_io_bytes_is_user;
182 float track_buffer_seconds;
183 bool track_buffer_seconds_is_user;
184 bool hiding_groups_deactivates_groups;
185 bool hiding_groups_deactivates_groups_is_user;
186 string auditioner_output_left;
187 bool auditioner_output_left_is_user;
188 string auditioner_output_right;
189 bool auditioner_output_right_is_user;
190 bool mute_affects_pre_fader;
191 bool mute_affects_pre_fader_is_user;
192 bool mute_affects_post_fader;
193 bool mute_affects_post_fader_is_user;
194 bool mute_affects_control_outs;
195 bool mute_affects_control_outs_is_user;
196 bool mute_affects_main_outs;
197 bool mute_affects_main_outs_is_user;
199 bool solo_latch_is_user;
200 uint32_t disk_choice_space_threshold;
201 bool disk_choice_space_threshold_is_user;
202 string mtc_port_name;
203 bool mtc_port_name_is_user;
204 string mmc_port_name;
205 bool mmc_port_name_is_user;
206 string midi_port_name;
207 bool midi_port_name_is_user;
208 bool use_hardware_monitoring;
209 bool use_hardware_monitoring_is_user;
210 bool be_jack_time_master;
211 bool be_jack_time_master_is_user;
212 bool native_format_is_bwf;
213 bool native_format_is_bwf_is_user;
214 bool trace_midi_input;
215 bool trace_midi_input_is_user;
216 bool trace_midi_output;
217 bool trace_midi_output_is_user;
218 bool plugins_stop_with_transport;
219 bool plugins_stop_with_transport_is_user;
220 bool no_sw_monitoring;
221 bool no_sw_monitoring_is_user;
222 bool stop_recording_on_xrun;
223 bool stop_recording_on_xrun_is_user;
224 bool verify_remove_last_capture;
225 bool verify_remove_last_capture_is_user;
226 bool stop_at_session_end;
227 bool stop_at_session_end_is_user;
228 bool seamless_looping;
229 bool seamless_looping_is_user;
231 bool auto_xfade_is_user;
232 bool no_new_session_dialog;
233 bool no_new_session_dialog_is_user;
234 uint32_t timecode_skip_limit;
235 bool timecode_skip_limit_is_user;
236 bool timecode_source_is_synced;
237 bool timecode_source_is_synced_is_user;
238 bool use_vst; /* always per-user */
239 bool quieten_at_speed;
240 bool quieten_at_speed_is_user;
243 bool user_configuration;
245 XMLNode& state (bool user_only);
248 extern Configuration *Config;
249 extern gain_t speed_quietning; /* see comment in configuration.cc */
251 }; /* namespace ARDOUR */
253 #endif /* __ardour_configuration_h__ */