summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-05-14 00:15:38 +0000
committerCarl Hetherington <carl@carlh.net>2009-05-14 00:15:38 +0000
commit6cf41417a0358d819bd4b5c862caa55ce7acf2cf (patch)
tree6a2082a26d1ca57ed9ce7212a908f59489031ef0 /libs/ardour/ardour
parent015fc7b39fab97cee1875231694adce43155ceb5 (diff)
Add missing files from last commit, as per.
git-svn-id: svn://localhost/ardour2/branches/3.0@5076 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/rc_configuration.h92
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h (renamed from libs/ardour/ardour/configuration_vars.h)36
-rw-r--r--libs/ardour/ardour/session_configuration.h69
-rw-r--r--libs/ardour/ardour/session_configuration_vars.h44
4 files changed, 205 insertions, 36 deletions
diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h
new file mode 100644
index 0000000000..abf22e4e9d
--- /dev/null
+++ b/libs/ardour/ardour/rc_configuration.h
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 1999 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_rc_configuration_h__
+#define __ardour_rc_configuration_h__
+
+#include <map>
+#include <string>
+
+#include "ardour/types.h"
+#include "ardour/utils.h"
+#include "ardour/configuration.h"
+
+class XMLNode;
+
+namespace ARDOUR {
+
+class RCConfiguration : public Configuration
+{
+ public:
+ RCConfiguration();
+
+ void map_parameters (sigc::slot<void,const char*>);
+ int set_state (XMLNode const &);
+ XMLNode& get_state ();
+ XMLNode& get_variables ();
+ void set_variables (XMLNode const &);
+
+ std::map<std::string, XMLNode> midi_ports;
+
+ int load_state ();
+ int save_state ();
+
+ /// calls Stateful::*instant_xml methods using
+ /// ARDOUR::user_config_directory for the directory argument
+ void add_instant_xml (XMLNode&);
+ XMLNode * instant_xml (const std::string& str);
+
+ XMLNode* control_protocol_state () { return _control_protocol_state; }
+
+ /* define accessor methods */
+
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(Type,var,name,value) \
+ Type get_##var () const { return var.get(); } \
+ bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
+ Type get_##var () const { return var.get(); } \
+ bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+#include "ardour/rc_configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+
+ private:
+
+ /* declare variables */
+
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(Type,var,name,value) ConfigVariable<Type> var;
+#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) ConfigVariableWithMutation<Type> var;
+#include "ardour/rc_configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+
+ XMLNode* _control_protocol_state;
+};
+
+/* XXX: rename this */
+extern RCConfiguration *Config;
+extern gain_t speed_quietning; /* see comment in configuration.cc */
+
+} // namespace ARDOUR
+
+#endif /* __ardour_configuration_h__ */
diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index f49663b55b..f90cde88c3 100644
--- a/libs/ardour/ardour/configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -23,9 +23,6 @@ CONFIG_VARIABLE (bool, auto_connect_master, "auto-connect-master", true)
CONFIG_VARIABLE (AutoConnectOption, output_auto_connect, "output-auto-connect", AutoConnectOption (0))
CONFIG_VARIABLE (AutoConnectOption, input_auto_connect, "input-auto-connect", AutoConnectOption (0))
-CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "default")
-CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "default")
-
/* MIDI and MIDI related */
CONFIG_VARIABLE (std::string, mtc_port_name, "mtc-port-name", "default")
@@ -57,8 +54,6 @@ CONFIG_VARIABLE (float, midi_readahead, "midi-readahead", 1.0)
CONFIG_VARIABLE (float, audio_track_buffer_seconds, "track-buffer-seconds", 5.0)
CONFIG_VARIABLE (float, midi_track_buffer_seconds, "midi-track-buffer-seconds", 1.0)
CONFIG_VARIABLE (uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000)
-CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
-CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
CONFIG_VARIABLE (bool, auto_analyse_audio, "auto-analyse-audio", false)
/* OSC */
@@ -66,21 +61,9 @@ CONFIG_VARIABLE (bool, auto_analyse_audio, "auto-analyse-audio", false)
CONFIG_VARIABLE (uint32_t, osc_port, "osc-port", 3819)
CONFIG_VARIABLE (bool, use_osc, "use-osc", false)
-/* fades, crossfades */
-
-CONFIG_VARIABLE (CrossfadeModel, xfade_model, "xfade-model", FullCrossfade)
-CONFIG_VARIABLE (bool, auto_xfade, "auto-xfade", true)
-CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015)
-CONFIG_VARIABLE (bool, xfades_active, "xfades-active", true)
-CONFIG_VARIABLE (bool, xfades_visible, "xfades-visible", true)
-CONFIG_VARIABLE (uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
-CONFIG_VARIABLE (bool, use_region_fades, "use-region-fades", true)
-CONFIG_VARIABLE (bool, show_region_fades, "show-region-fades", true)
-
/* editing related */
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
-CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", MoveAddHigher)
CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false)
CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi")
CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions", false)
@@ -110,11 +93,6 @@ CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "")
/* transport control and related */
-CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
-CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
-CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
-CONFIG_VARIABLE (bool, punch_in, "punch-in", false)
-CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
CONFIG_VARIABLE (bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
CONFIG_VARIABLE (bool, do_not_record_plugins, "do-not-record-plugins", false)
CONFIG_VARIABLE (bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
@@ -138,17 +116,13 @@ CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-
/* timecode and sync */
CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true)
-CONFIG_VARIABLE (SmpteFormat, smpte_format, "smpte-format", smpte_30)
CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false)
-CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true)
CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
/* metering */
CONFIG_VARIABLE (float, meter_hold, "meter-hold", 100.0f)
CONFIG_VARIABLE (float, meter_falloff, "meter-falloff", 27.0f)
-CONFIG_VARIABLE (nframes_t, over_length_short, "over-length-short", 2)
-CONFIG_VARIABLE (nframes_t, over_length_long, "over-length-long", 10)
/* miscellany */
@@ -156,7 +130,6 @@ CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactiva
CONFIG_VARIABLE (bool, verify_remove_last_capture, "verify-remove-last-capture", true)
CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
CONFIG_VARIABLE (bool, use_vst, "use-vst", true)
-CONFIG_VARIABLE (uint32_t, subframes_per_frame, "subframes-per-frame", 100)
CONFIG_VARIABLE (bool, save_history, "save-history", true)
CONFIG_VARIABLE (int32_t, saved_history_depth, "save-history-depth", 20)
CONFIG_VARIABLE (int32_t, history_depth, "history-depth", 20)
@@ -180,12 +153,3 @@ CONFIG_VARIABLE (std::string, default_session_parent_dir, "default-session-paren
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone)
-/* BWAV */
-
-CONFIG_VARIABLE (std::string, bwf_country_code, "bwf-country-code", "US")
-CONFIG_VARIABLE (std::string, bwf_organization_code, "bwf-organization-code", "US")
-
-/* these variables have custom set() methods (e.g. path globbing) */
-
-CONFIG_VARIABLE_SPECIAL(Glib::ustring, raid_path, "raid-path", "", path_expand)
-
diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h
new file mode 100644
index 0000000000..138702ae84
--- /dev/null
+++ b/libs/ardour/ardour/session_configuration.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2009 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_session_configuration_h__
+#define __ardour_session_configuration_h__
+
+#include "ardour/configuration.h"
+
+namespace ARDOUR {
+
+class SessionConfiguration : public Configuration
+{
+public:
+ SessionConfiguration ();
+
+ void map_parameters (sigc::slot<void, const char*>);
+ int set_state (XMLNode const &);
+ XMLNode& get_state ();
+ XMLNode& get_variables ();
+ void set_variables (XMLNode const &);
+
+ /* define accessor methods */
+
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(Type,var,name,value) \
+ Type get_##var () const { return var.get(); } \
+ bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
+ Type get_##var () const { return var.get(); } \
+ bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+#include "ardour/session_configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+
+ private:
+
+ /* declare variables */
+
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+#define CONFIG_VARIABLE(Type,var,name,value) ConfigVariable<Type> var;
+#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) ConfigVariableWithMutation<Type> var;
+#include "ardour/session_configuration_vars.h"
+#undef CONFIG_VARIABLE
+#undef CONFIG_VARIABLE_SPECIAL
+
+ int foo;
+};
+
+}
+
+#endif
diff --git a/libs/ardour/ardour/session_configuration_vars.h b/libs/ardour/ardour/session_configuration_vars.h
new file mode 100644
index 0000000000..d99fc031d8
--- /dev/null
+++ b/libs/ardour/ardour/session_configuration_vars.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2009 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+CONFIG_VARIABLE (CrossfadeModel, xfade_model, "xfade-model", FullCrossfade)
+CONFIG_VARIABLE (bool, auto_xfade, "auto-xfade", true)
+CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015)
+CONFIG_VARIABLE (bool, xfades_active, "xfades-active", true)
+CONFIG_VARIABLE (bool, xfades_visible, "xfades-visible", true)
+CONFIG_VARIABLE (uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
+CONFIG_VARIABLE (bool, use_region_fades, "use-region-fades", true)
+CONFIG_VARIABLE (bool, show_region_fades, "show-region-fades", true)
+CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
+CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
+CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
+CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
+CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
+CONFIG_VARIABLE (bool, punch_in, "punch-in", false)
+CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
+CONFIG_VARIABLE (uint32_t, subframes_per_frame, "subframes-per-frame", 100)
+CONFIG_VARIABLE (SmpteFormat, smpte_format, "smpte-format", smpte_30)
+CONFIG_VARIABLE_SPECIAL(Glib::ustring, raid_path, "raid-path", "", path_expand)
+CONFIG_VARIABLE (std::string, bwf_country_code, "bwf-country-code", "US")
+CONFIG_VARIABLE (std::string, bwf_organization_code, "bwf-organization-code", "US")
+CONFIG_VARIABLE (bool, end_marker_is_free, "end-marker-is-free", true)
+CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", MoveAddHigher)
+CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "default")
+CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "default")
+CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true)