total reimplementation of Configuration object internals to make adding new config vars an order of magnitude simpler. the actual path taken is a bit of a kludge, to put it mildly, but adding a new variable is now basically just one line in configuration_vars.h, and no work is required for serialization to/from ardour.rc.
git-svn-id: svn://localhost/trunk/ardour2@420 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ee7c3042bd
commit
948caba588
103
ardour.rc.in
103
ardour.rc.in
|
@ -27,109 +27,6 @@
|
|||
<Option name="quieten-at-speed" value="1.000000"/>
|
||||
<Option name="use-vst" value="yes"/>
|
||||
</Config>
|
||||
<Keys>
|
||||
<context name="default">
|
||||
<binding keys="Ctrl-w" action="close-dialog"/>
|
||||
<binding keys="Ctrl-u" action="start-prefix"/>
|
||||
<binding keys="Alt-e" action="toggle-editor-window"/>
|
||||
<binding keys="Alt-m" action="toggle-mixer-window"/>
|
||||
<binding keys="Alt-r" action="toggle-recorder-window"/>
|
||||
<binding keys="Alt-l" action="toggle-locations-window"/>
|
||||
<binding keys="Alt-c" action="toggle-big-clock-window"/>
|
||||
<binding keys="Alt-o" action="toggle-options-window"/>
|
||||
<binding keys=" " action="toggle-playback"/>
|
||||
<binding keys="Ctrl-Shift- " action="toggle-playback-forget-capture"/>
|
||||
<binding keys="Ctrl-n" action="new-session"/>
|
||||
<binding keys="Ctrl-t" action="add-audio-track"/>
|
||||
<binding keys="Ctrl-s" action="save-state"/>
|
||||
<binding keys="Ctrl-q" action="quit"/>
|
||||
<binding keys="Left" action="transport-rewind"/>
|
||||
<binding keys="Shift-Left" action="transport-rewind-fast"/>
|
||||
<binding keys="Ctrl-Left" action="transport-rewind-slow"/>
|
||||
<binding keys="Right" action="transport-forward"/>
|
||||
<binding keys="Shift-Right" action="transport-forward-fast"/>
|
||||
<binding keys="Ctrl-Right" action="transport-forward-slow"/>
|
||||
<binding keys="R" action="transport-record"/>
|
||||
<binding keys="i" action="toggle-punch-in"/>
|
||||
<binding keys="Home" action="transport-goto-start"/>
|
||||
<binding keys="Ctrl-a" action="transport-goto-start"/>
|
||||
<binding keys="End" action="transport-goto-end"/>
|
||||
<binding keys="Ctrl-e" action="transport-goto-end"/>
|
||||
<binding keys="Ctrl-m" action="send-all-midi-feedback"/>
|
||||
</context>
|
||||
<context name="editor">
|
||||
<binding keys="Tab" action="playhead-to-next-region-start"/>
|
||||
<binding keys="Ctrl-Tab" action="playhead-to-next-region-end"/>
|
||||
<binding keys="`" action="playhead-to-previous-region-start"/>
|
||||
<binding keys="Ctrl-`" action="playhead-to-previous-region-end"/>
|
||||
<binding keys="[" action="edit-cursor-to-previous-region-start"/>
|
||||
<binding keys="Ctrl-[" action="edit-cursor-to-previous-region-end"/>
|
||||
<binding keys="]" action="edit-cursor-to-next-region-start"/>
|
||||
<binding keys="Ctrl-]" action="edit-cursor-to-next-region-end"/>
|
||||
<binding keys="'" action="edit-cursor-to-next-region-sync"/>
|
||||
<binding keys=";" action="edit-cursor-to-previous-region-sync"/>
|
||||
<binding keys="Left" action="scroll-backward"/>
|
||||
<binding keys="Right" action="scroll-forward"/>
|
||||
<binding keys="KP_2" action="start-range"/>
|
||||
<binding keys="KP_8" action="finish-range"/>
|
||||
<binding keys="KP_6" action="jump-forward-to-mark"/>
|
||||
<binding keys="KP_Right" action="jump-forward-to-mark"/>
|
||||
<binding keys="KP_4" action="jump-backward-to-mark"/>
|
||||
<binding keys="KP_Left" action="jump-backward-to-mark"/>
|
||||
<binding keys="KP_Enter" action="add-location-from-playhead"/>
|
||||
<binding keys="KP_Add" action="nudge-forward"/>
|
||||
<binding keys="Ctrl-KP_Add" action="nudge-next-forward"/>
|
||||
<binding keys="KP_Subtract" action="nudge-backward"/>
|
||||
<binding keys="Ctrl-KP_Subtract" action="nudge-next-backward"/>
|
||||
<binding keys="=" action="temporal-zoom-out"/>
|
||||
<binding keys="-" action="temporal-zoom-in"/>
|
||||
<binding keys="Page_Up" action="scroll-tracks-up"/>
|
||||
<binding keys="Page_Down" action="scroll-tracks-down"/>
|
||||
<binding keys="a" action="align-regions-sync-relative"/>
|
||||
<binding keys="Meta-a" action="align-regions-sync"/>
|
||||
<binding keys="Meta-Ctrl-a" action="align-regions-end"/>
|
||||
<binding keys="Ctrl-A" action="align-regions-start-relative"/>
|
||||
<binding keys="Ctrl-b" action="brush-at-mouse"/>
|
||||
<binding keys="e" action="set-edit-cursor"/>
|
||||
<binding keys="f" action="toggle-follow-playhead"/>
|
||||
<binding keys="r" action="set-mouse-mode-range"/>
|
||||
<binding keys="g" action="set-mouse-mode-gain"/>
|
||||
<binding keys="l" action="toggle-auto-loop"/>
|
||||
<binding keys="o" action="set-mouse-mode-object"/>
|
||||
<binding keys="p" action="set-playhead"/>
|
||||
<binding keys="t" action="set-mouse-mode-timefx"/>
|
||||
<binding keys="s" action="split-at-mouse"/>
|
||||
<binding keys="Alt-s" action="split-at-edit-cursor"/>
|
||||
<binding keys="z" action="set-mouse-mode-zoom"/>
|
||||
<binding keys="Z" action="zoom-focus-playhead"/>
|
||||
<binding keys="Ctrl-z" action="set-undo"/>
|
||||
<binding keys="Ctrl-r" action="set-redo"/>
|
||||
<binding keys="Ctrl-x" action="editor-cut"/>
|
||||
<binding keys="Ctrl-c" action="editor-copy"/>
|
||||
<binding keys="Ctrl-v" action="editor-paste"/>
|
||||
<binding keys="Up" action="step-tracks-up"/>
|
||||
<binding keys="Down" action="step-tracks-down"/>
|
||||
<binding keys="Shift-Tab" action="extend-range-to-end-of-region"/>
|
||||
<binding keys="Ctrl-Shift-Tab" action="extend-range-to-start-of-region"/>
|
||||
<binding keys="Insert" action="insert-region"/>
|
||||
<binding keys="Delete" action="editor-cut"/>
|
||||
<binding keys="Meta-d" action="duplicate-region"/>
|
||||
<binding keys="Meta-s" action="duplicate-range"/>
|
||||
<binding keys="Alt-r" action="reverse-region"/>
|
||||
<binding keys="Alt-n" action="normalize-region"/>
|
||||
<binding keys="Ctrl-l" action="center-playhead"/>
|
||||
<binding keys="Ctrl-g" action="goto"/>
|
||||
<binding keys="Alt-f" action="playhead-forward"/>
|
||||
<binding keys="Alt-b" action="playhead-backward"/>
|
||||
<binding keys="Return" action="playhead-to-edit"/>
|
||||
<binding keys="Alt-Return" action="edit-to-playhead"/>
|
||||
<binding keys="F1" action="edit-cursor-to-range-start"/>
|
||||
<binding keys="F2" action="edit-cursor-to-range-end"/>
|
||||
<binding keys="F9" action="snap-to-beat"/>
|
||||
<binding keys="F10" action="snap-to-bar"/>
|
||||
<binding keys="." action="audition-at-mouse"/>
|
||||
</context>
|
||||
</Keys>
|
||||
<extra>
|
||||
<Keyboard edit-button="3" edit-modifier="4" delete-button="3" delete-modifier="1" snap-modifier="32"/>
|
||||
</extra>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <ardour/audioengine.h>
|
||||
#include <ardour/configuration.h>
|
||||
#include <ardour/auditioner.h>
|
||||
#include <ardour/destructive_filesource.h>
|
||||
#include <ardour/crossfade.h>
|
||||
#include <midi++/manager.h>
|
||||
#include <gtkmm2ext/stop_signal.h>
|
||||
|
@ -357,11 +358,11 @@ OptionEditor::destructo_xfade_adjustment_changed ()
|
|||
|
||||
/* val is in msecs */
|
||||
|
||||
Config->set_destructive_xfade_msecs ((uint32_t) floor (val));
|
||||
|
||||
if (session) {
|
||||
Config->set_destructive_xfade_msecs ((uint32_t) floor (val), session->frame_rate());
|
||||
} else {
|
||||
Config->set_destructive_xfade_msecs ((uint32_t) floor (val), 0);
|
||||
}
|
||||
DestructiveFileSource::setup_standard_crossfades (session->frame_rate());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -22,12 +22,15 @@
|
|||
#define __ardour_configuration_h__
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string>
|
||||
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/stateful.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/configuration_variable.h>
|
||||
|
||||
class XMLNode;
|
||||
|
||||
|
@ -54,202 +57,36 @@ class Configuration : public Stateful
|
|||
int load_state ();
|
||||
int save_state ();
|
||||
|
||||
XMLNode& option_node (const std::string &, const std::string &);
|
||||
|
||||
int set_state (const XMLNode&);
|
||||
XMLNode& get_state (void);
|
||||
|
||||
XMLNode * get_keys() const;
|
||||
void set_keys(XMLNode *);
|
||||
/* define accessor methods */
|
||||
|
||||
void set_latched_record_enable (bool yn);
|
||||
bool get_latched_record_enable();
|
||||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
#define CONFIG_VARIABLE(Type,var,name,value) \
|
||||
Type get_##var () const { return var.get(); } \
|
||||
void set_##var (Type val) { var.set (val); var.set_is_user (user_configuration); }
|
||||
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
|
||||
Type get_##var () const { return var.get(); } \
|
||||
void set_##var (Type val) { var.set (val); var.set_is_user (user_configuration); }
|
||||
#include "ardour/configuration_vars.h"
|
||||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
void set_use_vst (bool yn);
|
||||
bool get_use_vst();
|
||||
|
||||
bool get_trace_midi_input ();
|
||||
void set_trace_midi_input (bool);
|
||||
|
||||
bool get_trace_midi_output ();
|
||||
void set_trace_midi_output (bool);
|
||||
|
||||
std::string get_raid_path();
|
||||
void set_raid_path(std::string);
|
||||
|
||||
uint32_t get_minimum_disk_io();
|
||||
void set_minimum_disk_io(uint32_t);
|
||||
|
||||
float get_track_buffer();
|
||||
void set_track_buffer(float);
|
||||
|
||||
bool does_hiding_groups_deactivates_groups();
|
||||
void set_hiding_groups_deactivates_groups(bool);
|
||||
|
||||
std::string get_auditioner_output_left();
|
||||
void set_auditioner_output_left(std::string);
|
||||
|
||||
std::string get_auditioner_output_right();
|
||||
void set_auditioner_output_right(std::string);
|
||||
|
||||
bool get_mute_affects_pre_fader();
|
||||
void set_mute_affects_pre_fader (bool);
|
||||
|
||||
bool get_mute_affects_post_fader();
|
||||
void set_mute_affects_post_fader (bool);
|
||||
|
||||
bool get_mute_affects_control_outs ();
|
||||
void set_mute_affects_control_outs (bool);
|
||||
|
||||
bool get_mute_affects_main_outs ();
|
||||
void set_mute_affects_main_outs (bool);
|
||||
|
||||
bool get_solo_latch ();
|
||||
void set_solo_latch (bool);
|
||||
|
||||
uint32_t get_disk_choice_space_threshold();
|
||||
void set_disk_choice_space_threshold (uint32_t);
|
||||
|
||||
std::string get_mmc_port_name();
|
||||
void set_mmc_port_name(std::string);
|
||||
|
||||
std::string get_mtc_port_name();
|
||||
void set_mtc_port_name(std::string);
|
||||
|
||||
std::string get_midi_port_name();
|
||||
void set_midi_port_name(std::string);
|
||||
|
||||
uint32_t get_midi_feedback_interval_ms();
|
||||
void set_midi_feedback_interval_ms (uint32_t);
|
||||
|
||||
bool get_use_hardware_monitoring();
|
||||
void set_use_hardware_monitoring(bool);
|
||||
|
||||
bool get_use_sw_monitoring();
|
||||
void set_use_sw_monitoring(bool);
|
||||
|
||||
bool get_jack_time_master();
|
||||
void set_jack_time_master(bool);
|
||||
|
||||
bool get_native_format_is_bwf();
|
||||
void set_native_format_is_bwf(bool);
|
||||
|
||||
bool get_plugins_stop_with_transport();
|
||||
void set_plugins_stop_with_transport(bool);
|
||||
|
||||
bool get_stop_recording_on_xrun();
|
||||
void set_stop_recording_on_xrun(bool);
|
||||
|
||||
bool get_verify_remove_last_capture();
|
||||
void set_verify_remove_last_capture(bool);
|
||||
|
||||
bool get_stop_at_session_end();
|
||||
void set_stop_at_session_end(bool);
|
||||
|
||||
bool get_seamless_looping();
|
||||
void set_seamless_looping(bool);
|
||||
|
||||
bool get_auto_xfade();
|
||||
void set_auto_xfade (bool);
|
||||
|
||||
bool get_no_new_session_dialog();
|
||||
void set_no_new_session_dialog(bool);
|
||||
|
||||
uint32_t get_timecode_skip_limit ();
|
||||
void set_timecode_skip_limit (uint32_t);
|
||||
|
||||
bool get_timecode_source_is_synced ();
|
||||
void set_timecode_source_is_synced (bool);
|
||||
|
||||
gain_t get_quieten_at_speed ();
|
||||
void set_quieten_at_speed (gain_t);
|
||||
|
||||
uint32_t get_destructive_xfade_msecs ();
|
||||
void set_destructive_xfade_msecs (uint32_t, jack_nframes_t sample_rate = 0);
|
||||
|
||||
private:
|
||||
void set_defaults ();
|
||||
std::string get_system_path();
|
||||
std::string get_user_path();
|
||||
|
||||
/* this is subject to wordexp, so we need
|
||||
to keep the original (user-entered) form
|
||||
around. e.g. ~/blah-> /home/foo/blah
|
||||
*/
|
||||
|
||||
std::string raid_path;
|
||||
bool raid_path_is_user;
|
||||
std::string orig_raid_path;
|
||||
/* declare variables */
|
||||
|
||||
uint32_t minimum_disk_io_bytes;
|
||||
bool minimum_disk_io_bytes_is_user;
|
||||
float track_buffer_seconds;
|
||||
bool track_buffer_seconds_is_user;
|
||||
bool hiding_groups_deactivates_groups;
|
||||
bool hiding_groups_deactivates_groups_is_user;
|
||||
std::string auditioner_output_left;
|
||||
bool auditioner_output_left_is_user;
|
||||
std::string auditioner_output_right;
|
||||
bool auditioner_output_right_is_user;
|
||||
bool mute_affects_pre_fader;
|
||||
bool mute_affects_pre_fader_is_user;
|
||||
bool mute_affects_post_fader;
|
||||
bool mute_affects_post_fader_is_user;
|
||||
bool mute_affects_control_outs;
|
||||
bool mute_affects_control_outs_is_user;
|
||||
bool mute_affects_main_outs;
|
||||
bool mute_affects_main_outs_is_user;
|
||||
bool solo_latch;
|
||||
bool solo_latch_is_user;
|
||||
uint32_t disk_choice_space_threshold;
|
||||
bool disk_choice_space_threshold_is_user;
|
||||
std::string mtc_port_name;
|
||||
bool mtc_port_name_is_user;
|
||||
std::string mmc_port_name;
|
||||
bool mmc_port_name_is_user;
|
||||
std::string midi_port_name;
|
||||
bool midi_port_name_is_user;
|
||||
bool use_hardware_monitoring;
|
||||
bool use_hardware_monitoring_is_user;
|
||||
bool be_jack_time_master;
|
||||
bool be_jack_time_master_is_user;
|
||||
bool native_format_is_bwf;
|
||||
bool native_format_is_bwf_is_user;
|
||||
bool trace_midi_input;
|
||||
bool trace_midi_input_is_user;
|
||||
bool trace_midi_output;
|
||||
bool trace_midi_output_is_user;
|
||||
bool plugins_stop_with_transport;
|
||||
bool plugins_stop_with_transport_is_user;
|
||||
bool use_sw_monitoring;
|
||||
bool use_sw_monitoring_is_user;
|
||||
bool stop_recording_on_xrun;
|
||||
bool stop_recording_on_xrun_is_user;
|
||||
bool verify_remove_last_capture;
|
||||
bool verify_remove_last_capture_is_user;
|
||||
bool stop_at_session_end;
|
||||
bool stop_at_session_end_is_user;
|
||||
bool seamless_looping;
|
||||
bool seamless_looping_is_user;
|
||||
bool auto_xfade;
|
||||
bool auto_xfade_is_user;
|
||||
bool no_new_session_dialog;
|
||||
bool no_new_session_dialog_is_user;
|
||||
uint32_t timecode_skip_limit;
|
||||
bool timecode_skip_limit_is_user;
|
||||
bool timecode_source_is_synced;
|
||||
bool timecode_source_is_synced_is_user;
|
||||
bool use_vst; /* always per-user */
|
||||
bool quieten_at_speed;
|
||||
bool quieten_at_speed_is_user;
|
||||
uint32_t midi_feedback_interval_ms;
|
||||
bool midi_feedback_interval_ms_is_user;
|
||||
bool latched_record_enable;
|
||||
bool latched_record_enable_is_user;
|
||||
uint32_t destructive_xfade_msecs;
|
||||
bool destructive_xfade_msecs_is_user;
|
||||
#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/configuration_vars.h"
|
||||
#undef CONFIG_VARIABLE
|
||||
#undef CONFIG_VARIABLE_SPECIAL
|
||||
|
||||
XMLNode *key_node;
|
||||
bool user_configuration;
|
||||
|
||||
XMLNode& state (bool user_only);
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
#ifndef __ardour_configuration_variable_h__
|
||||
#define __ardour_configuration_variable_h__
|
||||
|
||||
#include <sstream>
|
||||
#include <ostream>
|
||||
|
||||
#include <pbd/xml++.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class ConfigVariableBase {
|
||||
public:
|
||||
ConfigVariableBase (std::string str) : _name (str), _is_user (false) {}
|
||||
virtual ~ConfigVariableBase() {}
|
||||
|
||||
std::string name() const { return _name; }
|
||||
bool is_user() const { return _is_user; }
|
||||
void set_is_user (bool yn) { _is_user = yn; }
|
||||
|
||||
virtual void add_to_node (XMLNode& node) = 0;
|
||||
virtual bool set_from_node (const XMLNode& node) = 0;
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
bool _is_user;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class ConfigVariable : public ConfigVariableBase
|
||||
{
|
||||
public:
|
||||
ConfigVariable (std::string str) : ConfigVariableBase (str) {}
|
||||
ConfigVariable (std::string str, T val) : ConfigVariableBase (str), value (val) {}
|
||||
|
||||
virtual void set (T val) {
|
||||
value = val;
|
||||
}
|
||||
|
||||
T get() const {
|
||||
return value;
|
||||
}
|
||||
|
||||
void add_to_node (XMLNode& node) {
|
||||
std::stringstream ss;
|
||||
ss << value;
|
||||
XMLNode* child = new XMLNode ("Option");
|
||||
child->add_property ("name", _name);
|
||||
child->add_property ("value", ss.str());
|
||||
node.add_child_nocopy (*child);
|
||||
}
|
||||
|
||||
bool set_from_node (const XMLNode& node) {
|
||||
const XMLProperty* prop;
|
||||
XMLNodeList nlist;
|
||||
XMLNodeConstIterator niter;
|
||||
XMLNode* child;
|
||||
|
||||
nlist = node.children();
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
|
||||
child = *niter;
|
||||
|
||||
if (child->name() == "Option") {
|
||||
if ((prop = child->property ("name")) != 0) {
|
||||
if (prop->value() == _name) {
|
||||
if ((prop = child->property ("value")) != 0) {
|
||||
std::stringstream ss;
|
||||
ss << prop->value();
|
||||
ss >> value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual T get_for_save() { return value; }
|
||||
T value;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class ConfigVariableWithMutation : public ConfigVariable<T>
|
||||
{
|
||||
public:
|
||||
ConfigVariableWithMutation (std::string name, T val, T (*m)(T))
|
||||
: ConfigVariable<T> (name, val), mutator (m) {}
|
||||
|
||||
void set (T val) {
|
||||
unmutated_value = val;
|
||||
ConfigVariable<T>::set (mutator (val));
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual T get_for_save() { return unmutated_value; }
|
||||
T unmutated_value;
|
||||
T (*mutator)(T);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* __ardour_configuration_variable_h__ */
|
|
@ -0,0 +1,43 @@
|
|||
#ifdef __APPLE__
|
||||
CONFIG_VARIABLE(std::string, auditioner_output_left, "auditioner-output-left" "coreaudio:Built-in Audio:in1")
|
||||
CONFIG_VARIABLE(std::string, auditioner_output_right, "auditioner-output-right", "coreaudio:Built-in Audio:in2")
|
||||
#else
|
||||
CONFIG_VARIABLE(std::string, auditioner_output_left, "auditioner-output-left", "alsa_pcm:playback_1")
|
||||
CONFIG_VARIABLE(std::string, auditioner_output_right, "auditioner-output-right", "alsa_pcm:playback_2")
|
||||
#endif
|
||||
|
||||
CONFIG_VARIABLE(std::string, mtc_port_name, "mtc-port-name", "default")
|
||||
CONFIG_VARIABLE(std::string, mmc_port_name, "mmc-port-name", "default")
|
||||
CONFIG_VARIABLE(std::string, midi_port_name, "midi-port-name", "default")
|
||||
CONFIG_VARIABLE(uint32_t, minimum_disk_io_bytes, "minimum-disk-io-bytes", 1024 * 256)
|
||||
CONFIG_VARIABLE(float, track_buffer_seconds, "track-buffer-seconds", 5.0)
|
||||
CONFIG_VARIABLE(bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
|
||||
CONFIG_VARIABLE(bool, mute_affects_pre_fader, "mute-affects-pre-fader", true)
|
||||
CONFIG_VARIABLE(bool, mute_affects_post_fader, "mute-affects-post-fader", true)
|
||||
CONFIG_VARIABLE(bool, mute_affects_control_outs, "mute-affects-control-outs", true)
|
||||
CONFIG_VARIABLE(bool, mute_affects_main_outs, "mute-affects-main-outs", true)
|
||||
CONFIG_VARIABLE(bool, solo_latch, "solo-latch", true)
|
||||
CONFIG_VARIABLE(bool, use_hardware_monitoring, "use-hardware-monitoring", true)
|
||||
CONFIG_VARIABLE(bool, jack_time_master, "jack-time-master", true)
|
||||
CONFIG_VARIABLE(bool, native_format_is_bwf, "native-format-is-bwf", true)
|
||||
CONFIG_VARIABLE(bool, trace_midi_input, "trace-midi-input", false)
|
||||
CONFIG_VARIABLE(bool, trace_midi_output, "trace-midi-output", false)
|
||||
CONFIG_VARIABLE(bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
|
||||
CONFIG_VARIABLE(bool, use_sw_monitoring, "use-sw-monitoring", true)
|
||||
CONFIG_VARIABLE(bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
|
||||
CONFIG_VARIABLE(bool, verify_remove_last_capture, "verify-remove-last-capture", true)
|
||||
CONFIG_VARIABLE(bool, stop_at_session_end, "stop-at-session-end", true)
|
||||
CONFIG_VARIABLE(bool, seamless_looping, "seamless-looping", true)
|
||||
CONFIG_VARIABLE(bool, auto_xfade, "auto-xfade", true)
|
||||
CONFIG_VARIABLE(bool, no_new_session_dialog, "no-new-session-dialog", false)
|
||||
CONFIG_VARIABLE(bool, timecode_source_is_synced, "timecode-source-is-synced", true)
|
||||
CONFIG_VARIABLE(bool, latched_record_enable, "latched-record-enable", false)
|
||||
CONFIG_VARIABLE(bool, use_vst, "use-vst", true)
|
||||
CONFIG_VARIABLE(bool, quieten_at_speed, "quieten-at-speed", true)
|
||||
CONFIG_VARIABLE(uint32_t, midi_feedback_interval_ms, "midi-feedback-interval-ms", 100)
|
||||
CONFIG_VARIABLE(uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000)
|
||||
CONFIG_VARIABLE(uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
|
||||
|
||||
/* these variables have custom set() methods */
|
||||
|
||||
CONFIG_VARIABLE_SPECIAL(std::string, raid_path, "raid-path", "", path_expand)
|
|
@ -44,12 +44,6 @@ namespace ARDOUR {
|
|||
|
||||
class FileSource : public Source {
|
||||
public:
|
||||
enum SampleFormat
|
||||
{
|
||||
FormatFloat = 0,
|
||||
FormatInt24
|
||||
};
|
||||
|
||||
FileSource (string path, jack_nframes_t rate, bool repair_first = false, SampleFormat samp_format=FormatFloat);
|
||||
FileSource (const XMLNode&, jack_nframes_t rate);
|
||||
~FileSource ();
|
||||
|
|
|
@ -242,6 +242,11 @@ namespace ARDOUR {
|
|||
volatile float progress;
|
||||
pthread_t thread;
|
||||
};
|
||||
|
||||
enum SampleFormat {
|
||||
FormatFloat = 0,
|
||||
FormatInt24
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -53,5 +53,6 @@ int touch_file(std::string path);
|
|||
uint32_t long get_uid();
|
||||
|
||||
std::string region_name_from_path (std::string path);
|
||||
std::string path_expand (std::string);
|
||||
|
||||
#endif /* __ardour_utils_h__ */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -389,6 +389,7 @@ string
|
|||
ARDOUR::find_config_file (string name)
|
||||
{
|
||||
char* envvar;
|
||||
|
||||
if ((envvar = getenv("ARDOUR_CONFIG_PATH")) == 0) {
|
||||
envvar = CONFIG_DIR;
|
||||
}
|
||||
|
|
|
@ -190,12 +190,12 @@ RouteGroup::set_hidden (bool yn, void *src)
|
|||
}
|
||||
if (yn) {
|
||||
_flags |= Hidden;
|
||||
if (Config->does_hiding_groups_deactivates_groups()) {
|
||||
if (Config->get_hiding_groups_deactivates_groups()) {
|
||||
_flags &= ~Active;
|
||||
}
|
||||
} else {
|
||||
_flags &= ~Hidden;
|
||||
if (Config->does_hiding_groups_deactivates_groups()) {
|
||||
if (Config->get_hiding_groups_deactivates_groups()) {
|
||||
_flags |= Active;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ Session::start_butler_thread ()
|
|||
{
|
||||
/* size is in Samples, not bytes */
|
||||
|
||||
dstream_buffer_size = (uint32_t) floor (Config->get_track_buffer() * (float) frame_rate());
|
||||
dstream_buffer_size = (uint32_t) floor (Config->get_track_buffer_seconds() * (float) frame_rate());
|
||||
|
||||
Crossfade::set_buffer_size (dstream_buffer_size);
|
||||
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_WORDEXP
|
||||
#include <wordexp.h>
|
||||
#endif
|
||||
|
||||
#include <pbd/error.h>
|
||||
#include <pbd/xml++.h>
|
||||
#include <ardour/utils.h>
|
||||
|
@ -222,3 +226,34 @@ region_name_from_path (string path)
|
|||
|
||||
return path;
|
||||
}
|
||||
|
||||
string
|
||||
path_expand (string path)
|
||||
{
|
||||
#ifdef HAVE_WORDEXP
|
||||
/* Handle tilde and environment variable expansion in session path */
|
||||
string ret = path;
|
||||
|
||||
wordexp_t expansion;
|
||||
switch (wordexp (path.c_str(), &expansion, WRDE_NOCMD|WRDE_UNDEF)) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
error << string_compose (_("illegal or badly-formed string used for path (%1)"), path) << endmsg;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (expansion.we_wordc > 1) {
|
||||
error << string_compose (_("path (%1) is ambiguous"), path) << endmsg;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = expansion.we_wordv[0];
|
||||
out:
|
||||
wordfree (&expansion);
|
||||
return ret;
|
||||
|
||||
#else
|
||||
return path;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue