X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_format_manager.cc;h=f87a08686f6e01f9b17e4ee8aa64d7544aba33e7;hb=e41296bf5d8ac95566e9bedd5599c7f8d74e2ed2;hp=ff115d44470a6d6e8e34c8c8da1d3882858f2a98;hpb=6fa6514cfdb0ce38d93b51197f599dfd091bad1d;p=ardour.git diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc index ff115d4447..f87a08686f 100644 --- a/libs/ardour/export_format_manager.cc +++ b/libs/ardour/export_format_manager.cc @@ -40,6 +40,8 @@ ExportFormatManager::ExportFormatManager (ExportFormatSpecPtr specification) : init_qualities (); init_formats (); init_sample_rates (); + + prev_description = current_selection->description(); } ExportFormatManager::~ExportFormatManager () @@ -176,6 +178,17 @@ ExportFormatManager::init_formats () fl_ptr->set_extension ("w64"); add_format (f_ptr); + f_ptr.reset (fl_ptr = new ExportFormatLinear ("CAF", ExportFormatBase::F_CAF)); + fl_ptr->add_sample_format (ExportFormatBase::SF_U8); + fl_ptr->add_sample_format (ExportFormatBase::SF_16); + fl_ptr->add_sample_format (ExportFormatBase::SF_24); + fl_ptr->add_sample_format (ExportFormatBase::SF_32); + fl_ptr->add_sample_format (ExportFormatBase::SF_Float); + fl_ptr->add_sample_format (ExportFormatBase::SF_Double); + fl_ptr->set_default_sample_format (ExportFormatBase::SF_Float); + fl_ptr->set_extension ("caf"); + add_format (f_ptr); + f_ptr.reset (fl_ptr = new ExportFormatLinear ("RAW", ExportFormatBase::F_RAW)); fl_ptr->add_sample_format (ExportFormatBase::SF_U8); fl_ptr->add_sample_format (ExportFormatBase::SF_8); @@ -203,6 +216,7 @@ void ExportFormatManager::init_sample_rates () { add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_Session, _("Session rate")))); + add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_8, "8 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_22_05, "22,05 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_44_1, "44,1 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_48, "48 kHz"))); @@ -255,66 +269,91 @@ void ExportFormatManager::set_name (string name) { current_selection->set_name (name); + check_for_description_change (); } void ExportFormatManager::select_src_quality (ExportFormatBase::SRCQuality value) { current_selection->set_src_quality (value); + check_for_description_change (); } void ExportFormatManager::select_with_cue (bool value) { current_selection->set_with_cue (value); + check_for_description_change (); } void ExportFormatManager::select_with_toc (bool value) { current_selection->set_with_toc (value); + check_for_description_change (); +} + +void +ExportFormatManager::select_with_mp4chaps (bool value) +{ + current_selection->set_with_mp4chaps (value); + check_for_description_change (); +} + +void +ExportFormatManager::set_command (std::string command) +{ + current_selection->set_command (command); + check_for_description_change (); } void ExportFormatManager::select_trim_beginning (bool value) { current_selection->set_trim_beginning (value); + check_for_description_change (); } void ExportFormatManager::select_silence_beginning (AnyTime const & time) { current_selection->set_silence_beginning (time); + check_for_description_change (); } void ExportFormatManager::select_trim_end (bool value) { current_selection->set_trim_end (value); + check_for_description_change (); } void ExportFormatManager::select_silence_end (AnyTime const & time) { current_selection->set_silence_end (time); + check_for_description_change (); } void ExportFormatManager::select_normalize (bool value) { current_selection->set_normalize (value); + check_for_description_change (); } void ExportFormatManager::select_normalize_target (float value) { current_selection->set_normalize_target (value); + check_for_description_change (); } void ExportFormatManager::select_tagging (bool tag) { current_selection->set_tag (tag); + check_for_description_change (); } void @@ -694,15 +733,26 @@ ExportFormatManager::selection_changed () } - /* Signal completeness */ + /* Signal completeness and possible description change */ CompleteChanged (current_selection->is_complete()); + check_for_description_change (); /* Reset pending state */ pending_selection_change = false; } +void +ExportFormatManager::check_for_description_change () +{ + std::string new_description = current_selection->description(); + if (new_description == prev_description) { return; } + + prev_description = new_description; + DescriptionChanged(); +} + ExportFormatManager::QualityPtr ExportFormatManager::get_selected_quality () {