*/
#include "ardour/session.h"
+#include "ardour/transport_master_manager.h"
+#include "actions.h"
#include "gui_thread.h"
#include "session_option_editor.h"
#include "search_path_option.h"
ComboOption<TimecodeFormat>* smf = new ComboOption<TimecodeFormat> (
"timecode-format",
- _("Timecode frames-per-second"),
+ _("Timecode samples-per-second"),
sigc::mem_fun (*_session_config, &SessionConfiguration::get_timecode_format),
sigc::mem_fun (*_session_config, &SessionConfiguration::set_timecode_format)
);
add_option (_("Media"), new OptionEditorHeading (_("Audio File Format")));
- ComboOption<SampleFormat>* sf = new ComboOption<SampleFormat> (
+ _sf = new ComboOption<SampleFormat> (
"native-file-data-format",
_("Sample format"),
sigc::mem_fun (*_session_config, &SessionConfiguration::get_native_file_data_format),
sigc::mem_fun (*_session_config, &SessionConfiguration::set_native_file_data_format)
);
-
- sf->add (FormatFloat, _("32-bit floating point"));
- sf->add (FormatInt24, _("24-bit integer"));
- sf->add (FormatInt16, _("16-bit integer"));
-
- add_option (_("Media"), sf);
+ add_option (_("Media"), _sf);
+ /* refill available sample-formats, depening on file-format */
+ parameter_changed ("native-file-header-format");
ComboOption<HeaderFormat>* hf = new ComboOption<HeaderFormat> (
"native-file-header-format",
#ifdef HAVE_RF64_RIFF
hf->add (RF64_WAV, _("RF64 (WAV compatible)"));
#endif
+ hf->add (FLAC, _("FLAC"));
add_option (_("Media"), hf);
sigc::mem_fun (*_session_config, &SessionConfiguration::set_auto_input)
));
- add_option (_("Monitoring"), new BoolOption (
+ add_option (_("Monitoring"), new CheckOption (
"have-monitor-section",
_("Use monitor section in this session"),
- sigc::mem_fun (*this, &SessionOptionEditor::get_use_monitor_section),
- sigc::mem_fun (*this, &SessionOptionEditor::set_use_monitor_section)
+ ActionManager::get_action(X_("Monitor"), "UseMonitorSection")
));
add_option (_("Monitoring"), new OptionEditorBlank ());
add_option (_("Misc"), new BoolOption (
"count-in",
- _("Count in before recording"),
+ _("Always count-in when recording"),
sigc::mem_fun (*_session_config, &SessionConfiguration::get_count_in),
sigc::mem_fun (*_session_config, &SessionConfiguration::set_count_in)
));
{
OptionEditor::parameter_changed (p);
if (p == "external-sync") {
- if (Config->get_sync_source() == Engine) {
+ if (TransportMasterManager::instance().current()->type() == Engine) {
_vpu->set_sensitive(!_session_config->get_external_sync());
} else {
_vpu->set_sensitive(true);
else if (p == "track-name-take") {
_take_name->set_sensitive(_session_config->get_track_name_take());
}
-}
-
-/* the presence of absence of a monitor section is not really a regular session
- * property so we provide these two functions to act as setter/getter slots
- */
-
-bool
-SessionOptionEditor::set_use_monitor_section (bool yn)
-{
- bool had_monitor_section = _session->monitor_out() != 0;
-
- if (yn) {
- _session->add_monitor_section ();
- } else {
- _session->remove_monitor_section ();
+ else if (p == "native-file-header-format") {
+ bool need_refill = true;
+ _sf->clear ();
+ if (_session_config->get_native_file_header_format() == FLAC) {
+ _sf->add (FormatInt24, _("24-bit integer"));
+ _sf->add (FormatInt16, _("16-bit integer"));
+ if (_session_config->get_native_file_data_format() == FormatFloat) {
+ _session_config->set_native_file_data_format (FormatInt24);
+ need_refill = false;
+ }
+ } else {
+ _sf->add (FormatFloat, _("32-bit floating point"));
+ _sf->add (FormatInt24, _("24-bit integer"));
+ _sf->add (FormatInt16, _("16-bit integer"));
+ }
+ if (need_refill) {
+ parameter_changed ("native-file-data-format");
+ }
}
-
- /* store this choice for any new sessions */
-
- Config->set_use_monitor_bus (yn);
-
- return had_monitor_section != (_session->monitor_out() != 0);
-}
-
-bool
-SessionOptionEditor::get_use_monitor_section ()
-{
- return _session->monitor_out() != 0;
}
void