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)
120 ComboOption<float>* vpu = new ComboOption<float> (
122 _("Pull-up / pull-down"),
123 mem_fun (*_session_config, &SessionConfiguration::get_video_pullup),
124 mem_fun (*_session_config, &SessionConfiguration::set_video_pullup)
127 vpu->add (4.1667 + 0.1, _("4.1667 + 0.1%"));
128 vpu->add (4.1667, _("4.1667"));
129 vpu->add (4.1667 - 0.1, _("4.1667 - 0.1%"));
130 vpu->add (0.1, _("0.1"));
131 vpu->add (0, _("none"));
132 vpu->add (-0.1, _("-0.1"));
133 vpu->add (-4.1667 + 0.1, _("-4.1667 + 0.1%"));
134 vpu->add (-4.1667, _("-4.1667"));
135 vpu->add (-4.1667 - 0.1, _("-4.1667 - 0.1%"));
137 add_option (_("Sync"), vpu);
141 add_option (_("Misc"), new OptionEditorHeading (_("Audio file format")));
143 ComboOption<SampleFormat>* sf = new ComboOption<SampleFormat> (
144 "native-file-data-format",
146 mem_fun (*_session_config, &SessionConfiguration::get_native_file_data_format),
147 mem_fun (*_session_config, &SessionConfiguration::set_native_file_data_format)
150 sf->add (FormatFloat, _("32-bit floating point"));
151 sf->add (FormatInt24, _("24-bit integer"));
152 sf->add (FormatInt16, _("16-bit integer"));
154 add_option (_("Misc"), sf);
156 ComboOption<HeaderFormat>* hf = new ComboOption<HeaderFormat> (
157 "native-file-header-format",
159 mem_fun (*_session_config, &SessionConfiguration::get_native_file_header_format),
160 mem_fun (*_session_config, &SessionConfiguration::set_native_file_header_format)
163 hf->add (BWF, _("Broadcast WAVE"));
164 hf->add (WAVE, _("WAVE"));
165 hf->add (WAVE64, _("WAVE-64"));
166 hf->add (CAF, _("CAF"));
168 add_option (_("Misc"), hf);
170 add_option (_("Misc"), new OptionEditorHeading (_("Layering")));
172 ComboOption<LayerModel>* lm = new ComboOption<LayerModel> (
175 mem_fun (*_session_config, &SessionConfiguration::get_layer_model),
176 mem_fun (*_session_config, &SessionConfiguration::set_layer_model)
179 lm->add (LaterHigher, _("later is higher"));
180 lm->add (MoveAddHigher, _("most recently moved or added is higher"));
181 lm->add (AddHigher, _("most recently added is higher"));
183 add_option (_("Misc"), lm);
185 add_option (_("Misc"), new OptionEditorHeading (_("Broadcast WAVE metadata")));
187 add_option (_("Misc"), new EntryOption (
190 mem_fun (*_session_config, &SessionConfiguration::get_bwf_country_code),
191 mem_fun (*_session_config, &SessionConfiguration::set_bwf_country_code)
194 add_option (_("Misc"), new EntryOption (
195 "bwf-organization-code",
196 _("Organization code"),
197 mem_fun (*_session_config, &SessionConfiguration::get_bwf_organization_code),
198 mem_fun (*_session_config, &SessionConfiguration::set_bwf_organization_code)