1 #include "ardour/session.h"
2 #include "session_option_editor.h"
6 using namespace ARDOUR;
8 SessionOptionEditor::SessionOptionEditor (Session* s)
9 : OptionEditor (&(s->config), _("Session Preferences")),
10 _session_config (&(s->config))
14 ComboOption<CrossfadeModel>* cfm = new ComboOption<CrossfadeModel> (
16 _("Crossfades are created"),
17 mem_fun (*_session_config, &SessionConfiguration::get_xfade_model),
18 mem_fun (*_session_config, &SessionConfiguration::set_xfade_model)
21 cfm->add (FullCrossfade, _("to span entire overlap"));
22 cfm->add (ShortCrossfade, _("short"));
24 add_option (_("Fades"), cfm);
26 add_option (_("Fades"), new SpinOption<float> (
27 _("short-xfade-seconds"),
28 _("Short crossfade length"),
29 mem_fun (*_session_config, &SessionConfiguration::get_short_xfade_seconds),
30 mem_fun (*_session_config, &SessionConfiguration::set_short_xfade_seconds),
35 add_option (_("Fades"), new SpinOption<float> (
36 _("destructive-xfade-seconds"),
37 _("Destructive crossfade length"),
38 mem_fun (*_session_config, &SessionConfiguration::get_destructive_xfade_msecs),
39 mem_fun (*_session_config, &SessionConfiguration::set_destructive_xfade_msecs),
44 add_option (_("Fades"), new BoolOption (
46 _("Create crossfades automatically"),
47 mem_fun (*_session_config, &SessionConfiguration::get_auto_xfade),
48 mem_fun (*_session_config, &SessionConfiguration::set_auto_xfade)
51 add_option (_("Fades"), new BoolOption (
53 _("Crossfades active"),
54 mem_fun (*_session_config, &SessionConfiguration::get_xfades_active),
55 mem_fun (*_session_config, &SessionConfiguration::set_xfades_active)
58 add_option (_("Fades"), new BoolOption (
60 _("Crossfades visible"),
61 mem_fun (*_session_config, &SessionConfiguration::get_xfades_visible),
62 mem_fun (*_session_config, &SessionConfiguration::set_xfades_visible)
65 add_option (_("Fades"), new BoolOption (
67 _("Region fades active"),
68 mem_fun (*_session_config, &SessionConfiguration::get_use_region_fades),
69 mem_fun (*_session_config, &SessionConfiguration::set_use_region_fades)
72 add_option (_("Fades"), new BoolOption (
74 _("Region fades visible"),
75 mem_fun (*_session_config, &SessionConfiguration::get_show_region_fades),
76 mem_fun (*_session_config, &SessionConfiguration::set_show_region_fades)
81 ComboOption<uint32_t>* spf = new ComboOption<uint32_t> (
82 "subframes-per-frame",
83 _("Subframes per frame"),
84 mem_fun (*_session_config, &SessionConfiguration::get_subframes_per_frame),
85 mem_fun (*_session_config, &SessionConfiguration::set_subframes_per_frame)
88 spf->add (80, _("80"));
89 spf->add (100, _("100"));
91 add_option (_("Sync"), spf);
93 ComboOption<SmpteFormat>* smf = new ComboOption<SmpteFormat> (
95 _("Timecode frames-per-second"),
96 mem_fun (*_session_config, &SessionConfiguration::get_smpte_format),
97 mem_fun (*_session_config, &SessionConfiguration::set_smpte_format)
100 smf->add (smpte_23976, _("23.976"));
101 smf->add (smpte_24, _("24"));
102 smf->add (smpte_24976, _("24.976"));
103 smf->add (smpte_25, _("25"));
104 smf->add (smpte_2997, _("29.97"));
105 smf->add (smpte_2997drop, _("29.97 drop"));
106 smf->add (smpte_30, _("30"));
107 smf->add (smpte_30drop, _("30 drop"));
108 smf->add (smpte_5994, _("59.94"));
109 smf->add (smpte_60, _("60"));
111 add_option (_("Sync"), smf);
113 add_option (_("Sync"), new BoolOption (
114 "timecode-source-is-synced",
115 _("Timecode source is synced"),
116 mem_fun (*_session_config, &SessionConfiguration::get_timecode_source_is_synced),
117 mem_fun (*_session_config, &SessionConfiguration::set_timecode_source_is_synced)
122 add_option (_("Misc"), new OptionEditorHeading (_("Audio file format")));
124 ComboOption<SampleFormat>* sf = new ComboOption<SampleFormat> (
125 "native-file-data-format",
127 mem_fun (*_session_config, &SessionConfiguration::get_native_file_data_format),
128 mem_fun (*_session_config, &SessionConfiguration::set_native_file_data_format)
131 sf->add (FormatFloat, _("32-bit floating point"));
132 sf->add (FormatInt24, _("24-bit integer"));
133 sf->add (FormatInt16, _("16-bit integer"));
135 add_option (_("Misc"), sf);
137 ComboOption<HeaderFormat>* hf = new ComboOption<HeaderFormat> (
138 "native-file-header-format",
140 mem_fun (*_session_config, &SessionConfiguration::get_native_file_header_format),
141 mem_fun (*_session_config, &SessionConfiguration::set_native_file_header_format)
144 hf->add (BWF, _("Broadcast WAVE"));
145 hf->add (WAVE, _("WAVE"));
146 hf->add (WAVE64, _("WAVE-64"));
147 hf->add (CAF, _("CAF"));
149 add_option (_("Misc"), hf);
151 add_option (_("Misc"), new OptionEditorHeading (_("Layering")));
153 ComboOption<LayerModel>* lm = new ComboOption<LayerModel> (
156 mem_fun (*_session_config, &SessionConfiguration::get_layer_model),
157 mem_fun (*_session_config, &SessionConfiguration::set_layer_model)
160 lm->add (LaterHigher, _("later is higher"));
161 lm->add (MoveAddHigher, _("most recently moved or added is higher"));
162 lm->add (AddHigher, _("most recently added is higher"));
164 add_option (_("Misc"), lm);
166 add_option (_("Misc"), new OptionEditorHeading (_("Broadcast WAVE metadata")));
168 add_option (_("Misc"), new EntryOption (
171 mem_fun (*_session_config, &SessionConfiguration::get_bwf_country_code),
172 mem_fun (*_session_config, &SessionConfiguration::set_bwf_country_code)
175 add_option (_("Misc"), new EntryOption (
176 "bwf-organization-code",
177 _("Organization code"),
178 mem_fun (*_session_config, &SessionConfiguration::get_bwf_organization_code),
179 mem_fun (*_session_config, &SessionConfiguration::set_bwf_organization_code)