*/
#include "ardour/session.h"
+#include "ardour/transport_master_manager.h"
#include "gui_thread.h"
#include "session_option_editor.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);
{
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());
}
+ 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");
+ }
+ }
}
/* the presence of absence of a monitor section is not really a regular session