GUI options to select FLAC as media format
This commit is contained in:
parent
2991afaf0d
commit
b06713bd8e
|
@ -1661,6 +1661,9 @@ ARDOUR_UI::update_format ()
|
||||||
case MBWF:
|
case MBWF:
|
||||||
s << _("MBWF");
|
s << _("MBWF");
|
||||||
break;
|
break;
|
||||||
|
case FLAC:
|
||||||
|
s << _("FLAC");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
s << " ";
|
s << " ";
|
||||||
|
|
|
@ -179,18 +179,15 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||||
|
|
||||||
add_option (_("Media"), new OptionEditorHeading (_("Audio File Format")));
|
add_option (_("Media"), new OptionEditorHeading (_("Audio File Format")));
|
||||||
|
|
||||||
ComboOption<SampleFormat>* sf = new ComboOption<SampleFormat> (
|
_sf = new ComboOption<SampleFormat> (
|
||||||
"native-file-data-format",
|
"native-file-data-format",
|
||||||
_("Sample format"),
|
_("Sample format"),
|
||||||
sigc::mem_fun (*_session_config, &SessionConfiguration::get_native_file_data_format),
|
sigc::mem_fun (*_session_config, &SessionConfiguration::get_native_file_data_format),
|
||||||
sigc::mem_fun (*_session_config, &SessionConfiguration::set_native_file_data_format)
|
sigc::mem_fun (*_session_config, &SessionConfiguration::set_native_file_data_format)
|
||||||
);
|
);
|
||||||
|
add_option (_("Media"), _sf);
|
||||||
sf->add (FormatFloat, _("32-bit floating point"));
|
/* refill available sample-formats, depening on file-format */
|
||||||
sf->add (FormatInt24, _("24-bit integer"));
|
parameter_changed ("native-file-header-format");
|
||||||
sf->add (FormatInt16, _("16-bit integer"));
|
|
||||||
|
|
||||||
add_option (_("Media"), sf);
|
|
||||||
|
|
||||||
ComboOption<HeaderFormat>* hf = new ComboOption<HeaderFormat> (
|
ComboOption<HeaderFormat>* hf = new ComboOption<HeaderFormat> (
|
||||||
"native-file-header-format",
|
"native-file-header-format",
|
||||||
|
@ -210,6 +207,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||||
#ifdef HAVE_RF64_RIFF
|
#ifdef HAVE_RF64_RIFF
|
||||||
hf->add (RF64_WAV, _("RF64 (WAV compatible)"));
|
hf->add (RF64_WAV, _("RF64 (WAV compatible)"));
|
||||||
#endif
|
#endif
|
||||||
|
hf->add (FLAC, _("FLAC"));
|
||||||
|
|
||||||
add_option (_("Media"), hf);
|
add_option (_("Media"), hf);
|
||||||
|
|
||||||
|
@ -410,6 +408,13 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||||
set_current_page (_("Timecode"));
|
set_current_page (_("Timecode"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SessionOptionEditor::~SessionOptionEditor ()
|
||||||
|
{
|
||||||
|
delete _vpu;
|
||||||
|
delete _sf;
|
||||||
|
delete _take_name;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SessionOptionEditor::parameter_changed (std::string const & p)
|
SessionOptionEditor::parameter_changed (std::string const & p)
|
||||||
{
|
{
|
||||||
|
@ -429,6 +434,25 @@ SessionOptionEditor::parameter_changed (std::string const & p)
|
||||||
else if (p == "track-name-take") {
|
else if (p == "track-name-take") {
|
||||||
_take_name->set_sensitive(_session_config->get_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
|
/* the presence of absence of a monitor section is not really a regular session
|
||||||
|
|
|
@ -31,6 +31,7 @@ class SessionOptionEditor : public OptionEditorWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SessionOptionEditor (ARDOUR::Session* s);
|
SessionOptionEditor (ARDOUR::Session* s);
|
||||||
|
~SessionOptionEditor ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void parameter_changed (std::string const &);
|
void parameter_changed (std::string const &);
|
||||||
|
@ -41,6 +42,7 @@ private:
|
||||||
bool get_use_monitor_section ();
|
bool get_use_monitor_section ();
|
||||||
|
|
||||||
ComboOption<float>* _vpu;
|
ComboOption<float>* _vpu;
|
||||||
|
ComboOption<ARDOUR::SampleFormat>* _sf;
|
||||||
EntryOption* _take_name;
|
EntryOption* _take_name;
|
||||||
|
|
||||||
void save_defaults ();
|
void save_defaults ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user