X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fexport_format_dialog.cc;h=f76effaebba4d614b4dc08fb87130c07c6704369;hb=62937ea1a658786f7615258bfe77af096c73123b;hp=593f16ec5898093c810fcb8a9d6700c715e7fba7;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc index 593f16ec58..f76effaebb 100644 --- a/gtk2_ardour/export_format_dialog.cc +++ b/gtk2_ardour/export_format_dialog.cc @@ -18,17 +18,17 @@ */ -#include "export_format_dialog.h" - #include "ardour/session.h" #include "ardour/export_format_specification.h" +#include "export_format_dialog.h" +#include "gui_thread.h" #include "i18n.h" using namespace ARDOUR; ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : - ArdourDialog (new_dialog ? _("New export format profile") : _("Edit export format profile")), + ArdourDialog (new_dialog ? _("New Export Format Profile") : _("Edit Export Format Profile")), format (format), manager (format), original_state (format->get_state()), @@ -36,6 +36,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : applying_changes_from_engine (0), name_label (_("Label: "), Gtk::ALIGN_LEFT), + name_generated_part ("", Gtk::ALIGN_LEFT), normalize_checkbox (_("Normalize to:")), normalize_adjustment (0.00, -90.00, 0.00, 0.1, 0.2), @@ -44,11 +45,13 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : silence_table (2, 4), trim_start_checkbox (_("Trim silence at start")), silence_start_checkbox (_("Add silence at start:")), - silence_start_clock ("silence_start", true, "PreRollClock", true, true), + silence_start_clock ("silence_start", true, "", true, false, true), trim_end_checkbox (_("Trim silence at end")), silence_end_checkbox (_("Add silence at end:")), - silence_end_clock ("silence_end", true, "PreRollClock", true, true), + silence_end_clock ("silence_end", true, "", true, false, true), + + command_label(_("Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename):"), Gtk::ALIGN_LEFT), format_table (3, 4), compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT), @@ -57,27 +60,38 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : sample_rate_label (_("Sample rate"), Gtk::ALIGN_LEFT), src_quality_label (_("Sample rate conversion quality:"), Gtk::ALIGN_RIGHT), - encoding_options_label (_(""), Gtk::ALIGN_LEFT), + encoding_options_label ("", Gtk::ALIGN_LEFT), /* Changing encoding options from here on */ sample_format_label (_("Sample Format"), Gtk::ALIGN_LEFT), dither_label (_("Dithering"), Gtk::ALIGN_LEFT), + with_cue (_("Create CUE file for disk-at-once CD/DVD creation")), + with_toc (_("Create TOC file for disk-at-once CD/DVD creation")), + with_mp4chaps (_("Create chapter mark file for MP4 chapter marks")), + tag_checkbox (_("Tag file with session's metadata")) { /* Pack containers in dialog */ - get_vbox()->pack_start (name_hbox, false, false, 0); get_vbox()->pack_start (silence_table, false, false, 6); get_vbox()->pack_start (format_table, false, false, 6); get_vbox()->pack_start (encoding_options_vbox, false, false, 0); + get_vbox()->pack_start (cue_toc_vbox, false, false, 0); + get_vbox()->pack_start (name_hbox, false, false, 6); /* Name, new and remove */ name_hbox.pack_start (name_label, false, false, 0); - name_hbox.pack_start (name_entry, true, true, 0); + name_hbox.pack_start (name_entry, false, false, 0); + name_hbox.pack_start (name_generated_part, true, true, 0); + name_entry.set_width_chars(20); + update_description(); + manager.DescriptionChanged.connect( + *this, invalidator (*this), + boost::bind (&ExportFormatDialog::update_description, this), gui_context()); /* Normalize */ @@ -102,6 +116,11 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : silence_table.attach (silence_end_checkbox, 1, 2, 2, 3); silence_table.attach (silence_end_clock, 2, 3, 2, 3); + /* Post-export hook script */ + + get_vbox()->pack_start (command_label, false, false); + get_vbox()->pack_start (command_entry, false, false); + /* Format table */ init_format_table(); @@ -123,11 +142,20 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : /* Buttons */ revert_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); - revert_button->signal_clicked().connect (mem_fun(*this, &ExportFormatDialog::revert)); + revert_button->signal_clicked().connect (sigc::mem_fun(*this, &ExportFormatDialog::revert)); close_button = add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_APPLY); close_button->set_sensitive (false); - close_button->signal_clicked().connect (mem_fun (*this, &ExportFormatDialog::end_dialog)); - manager.CompleteChanged.connect (mem_fun (*close_button, &Gtk::Button::set_sensitive)); + close_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportFormatDialog::end_dialog)); + manager.CompleteChanged.connect (*this, invalidator (*this), boost::bind (&Gtk::Button::set_sensitive, close_button, _1), gui_context()); + + with_cue.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_cue)); + with_toc.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_toc)); + with_mp4chaps.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_mp4chaps)); + command_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_command)); + + cue_toc_vbox.pack_start (with_cue, false, false); + cue_toc_vbox.pack_start (with_toc, false, false); + cue_toc_vbox.pack_start (with_mp4chaps, false, false); /* Load state before hooking up the rest of the signals */ @@ -135,40 +163,40 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : /* Name entry */ - name_entry.signal_changed().connect (mem_fun (*this, &ExportFormatDialog::update_name)); + name_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_name)); /* Normalize, silence and src_quality signals */ - trim_start_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_trim_start_selection)); - trim_end_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_trim_end_selection)); + trim_start_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_trim_start_selection)); + trim_end_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_trim_end_selection)); - normalize_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_normalize_selection)); - normalize_spinbutton.signal_value_changed().connect (mem_fun (*this, &ExportFormatDialog::update_normalize_selection)); + normalize_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection)); + normalize_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_normalize_selection)); - silence_start_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_silence_start_selection)); - silence_start_clock.ValueChanged.connect (mem_fun (*this, &ExportFormatDialog::update_silence_start_selection)); + silence_start_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection)); + silence_start_clock.ValueChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_start_selection)); - silence_end_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_silence_end_selection)); - silence_end_clock.ValueChanged.connect (mem_fun (*this, &ExportFormatDialog::update_silence_end_selection)); + silence_end_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_end_selection)); + silence_end_clock.ValueChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::update_silence_end_selection)); - src_quality_combo.signal_changed().connect (mem_fun (*this, &ExportFormatDialog::update_src_quality_selection)); + src_quality_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_src_quality_selection)); /* Format table signals */ Gtk::CellRendererToggle *toggle = dynamic_cast(compatibility_view.get_column_cell_renderer (0)); - toggle->signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_compatibility_selection)); - compatibility_select_connection = compatibility_view.get_selection()->signal_changed().connect (mem_fun (*this, &ExportFormatDialog::prohibit_compatibility_selection)); + toggle->signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_compatibility_selection)); + compatibility_select_connection = compatibility_view.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::prohibit_compatibility_selection)); - quality_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_quality_selection)); - format_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_format_selection)); - sample_rate_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_sample_rate_selection)); + quality_view.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &ExportFormatDialog::update_quality_selection)); + format_view.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &ExportFormatDialog::update_format_selection)); + sample_rate_view.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &ExportFormatDialog::update_sample_rate_selection)); /* Encoding option signals */ - sample_format_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_sample_format_selection)); - dither_type_view.get_selection()->signal_changed().connect (mem_fun(*this, &ExportFormatDialog::update_dither_type_selection)); + sample_format_view.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &ExportFormatDialog::update_sample_format_selection)); + dither_type_view.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &ExportFormatDialog::update_dither_type_selection)); - tag_checkbox.signal_toggled().connect (mem_fun (*this, &ExportFormatDialog::update_tagging_selection)); + tag_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_tagging_selection)); /* Finalize */ @@ -194,14 +222,14 @@ ExportFormatDialog::revert () void ExportFormatDialog::set_session (ARDOUR::Session* s) { - session = s; - if (!session) { - return; - } - + SessionHandlePtr::set_session (s); silence_start_clock.set_session (s); silence_end_clock.set_session (s); + if (!_session) { + return; + } + update_clock (silence_start_clock, silence_start); update_clock (silence_end_clock, silence_end); @@ -210,7 +238,7 @@ ExportFormatDialog::set_session (ARDOUR::Session* s) if (sample_rate_view.get_selection()->count_selected_rows() == 0) { Gtk::ListStore::Children::iterator it; for (it = sample_rate_list->children().begin(); it != sample_rate_list->children().end(); ++it) { - if ((nframes_t) (*it)->get_value (sample_rate_cols.ptr)->rate == session->nominal_frame_rate()) { + if ((framecnt_t) (*it)->get_value (sample_rate_cols.ptr)->rate == _session->nominal_frame_rate()) { sample_rate_view.get_selection()->select (it); break; } @@ -228,11 +256,15 @@ ExportFormatDialog::load_state (FormatPtr spec) trim_start_checkbox.set_active (spec->trim_beginning()); silence_start = spec->silence_beginning_time(); - silence_start_checkbox.set_active (spec->silence_beginning() > 0); + silence_start_checkbox.set_active (spec->silence_beginning_time().not_zero()); trim_end_checkbox.set_active (spec->trim_end()); silence_end = spec->silence_end_time(); - silence_end_checkbox.set_active (spec->silence_end() > 0); + silence_end_checkbox.set_active (spec->silence_end_time().not_zero()); + + with_cue.set_active (spec->with_cue()); + with_toc.set_active (spec->with_toc()); + with_mp4chaps.set_active (spec->with_mp4chaps()); for (Gtk::ListStore::Children::iterator it = src_quality_list->children().begin(); it != src_quality_list->children().end(); ++it) { if (it->get_value (src_quality_cols.id) == spec->src_quality()) { @@ -242,8 +274,12 @@ ExportFormatDialog::load_state (FormatPtr spec) } for (Gtk::ListStore::Children::iterator it = format_list->children().begin(); it != format_list->children().end(); ++it) { - if (it->get_value (format_cols.ptr)->get_format_id() == spec->format_id()) { - it->get_value (format_cols.ptr)->set_selected (true); + boost::shared_ptr format_in_list = it->get_value (format_cols.ptr); + if (format_in_list->get_format_id() == spec->format_id() && + // BWF has the same format id with wav, so we need to check this. + format_in_list->has_broadcast_info() == spec->has_broadcast_info()) { + + format_in_list->set_selected (true); break; } } @@ -272,6 +308,7 @@ ExportFormatDialog::load_state (FormatPtr spec) } tag_checkbox.set_active (spec->tag()); + command_entry.set_text (spec->command()); } void @@ -319,7 +356,7 @@ ExportFormatDialog::init_format_table () row[compatibility_cols.label] = (*it)->name(); WeakCompatPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_compatibility_selection), ptr)); + (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_compatibility_selection, this, _1, ptr), gui_context()); } compatibility_view.append_column_editable ("", compatibility_cols.selected); @@ -347,8 +384,8 @@ ExportFormatDialog::init_format_table () row[quality_cols.label] = (*it)->name(); WeakQualityPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_quality_selection, this, _1, ptr), gui_context()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_quality_compatibility, this, _1, ptr), gui_context()); } quality_view.append_column ("", quality_cols.label); @@ -369,19 +406,19 @@ ExportFormatDialog::init_format_table () row[format_cols.label] = (*it)->name(); WeakFormatPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_format_selection, this, _1, ptr), gui_context()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_format_compatibility, this, _1, ptr), gui_context()); /* Encoding options */ boost::shared_ptr hsf; - if (hsf = boost::dynamic_pointer_cast (*it)) { - hsf->SampleFormatSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_selection)); - hsf->SampleFormatCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_compatibility)); + if ((hsf = boost::dynamic_pointer_cast (*it))) { + hsf->SampleFormatSelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_selection, this, _1, _2), gui_context()); + hsf->SampleFormatCompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_compatibility, this, _1, _2), gui_context()); - hsf->DitherTypeSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_selection)); - hsf->DitherTypeCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_compatibility)); + hsf->DitherTypeSelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_dither_type_selection, this, _1, _2), gui_context()); + hsf->DitherTypeCompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_dither_type_compatibility, this, _1, _2), gui_context()); } } @@ -403,8 +440,8 @@ ExportFormatDialog::init_format_table () row[sample_rate_cols.label] = (*it)->name(); WeakSampleRatePtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context()); } sample_rate_view.append_column ("", sample_rate_cols.label); @@ -485,11 +522,11 @@ ExportFormatDialog::init_encoding_option_widgets () } void -ExportFormatDialog::update_compatibility_selection (Glib::ustring const & path) +ExportFormatDialog::update_compatibility_selection (std::string const & path) { Gtk::TreeModel::iterator iter = compatibility_view.get_model ()->get_iter (path); - ExportFormatManager::CompatPtr ptr = iter->get_value (compatibility_cols.ptr); + ExportFormatCompatibilityPtr ptr = iter->get_value (compatibility_cols.ptr); bool state = iter->get_value (compatibility_cols.selected); iter->set_value (compatibility_cols.selected, state); @@ -549,7 +586,7 @@ ExportFormatDialog::change_compatibility_selection (bool select, WeakCompatPtr c { ++applying_changes_from_engine; - ExportFormatManager::CompatPtr ptr = compat.lock(); + ExportFormatCompatibilityPtr ptr = compat.lock(); for (Gtk::ListStore::Children::iterator it = compatibility_list->children().begin(); it != compatibility_list->children().end(); ++it) { if (it->get_value (compatibility_cols.ptr) == ptr) { @@ -572,7 +609,7 @@ ExportFormatDialog::change_format_selection (bool select, WeakFormatPtr format) { change_selection (select, format, format_list, format_view, format_cols); - ExportFormatManager::FormatPtr ptr = format.lock(); + ExportFormatPtr ptr = format.lock(); if (select && ptr) { change_encoding_options (ptr); @@ -586,8 +623,8 @@ ExportFormatDialog::change_sample_rate_selection (bool select, WeakSampleRatePtr if (select) { ExportFormatManager::SampleRatePtr ptr = rate.lock(); - if (ptr && session) { - src_quality_combo.set_sensitive ((uint32_t) ptr->rate != session->frame_rate()); + if (ptr && _session) { + src_quality_combo.set_sensitive ((uint32_t) ptr->rate != _session->frame_rate()); } } } @@ -668,7 +705,7 @@ ExportFormatDialog::change_dither_type_compatibility (bool compatibility, WeakDi template void ExportFormatDialog::change_compatibility (bool compatibility, boost::weak_ptr w_ptr, Glib::RefPtr & list, ColsT & cols, - Glib::ustring const & c_incompatible, Glib::ustring const & c_compatible) + std::string const & c_incompatible, std::string const & c_compatible) { boost::shared_ptr ptr = w_ptr.lock(); @@ -681,6 +718,37 @@ ExportFormatDialog::change_compatibility (bool compatibility, boost::weak_ptr } } +void +ExportFormatDialog::update_with_cue () +{ + manager.select_with_cue (with_cue.get_active()); +} + +void +ExportFormatDialog::update_with_toc () +{ + manager.select_with_toc (with_toc.get_active()); +} + +void +ExportFormatDialog::update_with_mp4chaps () +{ + manager.select_with_mp4chaps (with_mp4chaps.get_active()); +} + +void +ExportFormatDialog::update_command () +{ + manager.set_command (command_entry.get_text()); +} + +void +ExportFormatDialog::update_description() +{ + std::string text = ": " + format->description(false); + name_generated_part.set_text(text); +} + void ExportFormatDialog::update_name () { @@ -711,7 +779,7 @@ ExportFormatDialog::update_silence_start_selection () { update_time (silence_start, silence_start_clock); AnyTime zero; - zero.type = AnyTime::SMPTE; + zero.type = AnyTime::Timecode; manager.select_silence_beginning (silence_start_checkbox.get_active() ? silence_start : zero); } @@ -720,7 +788,7 @@ ExportFormatDialog::update_silence_end_selection () { update_time (silence_end, silence_end_clock); AnyTime zero; - zero.type = AnyTime::SMPTE; + zero.type = AnyTime::Timecode; manager.select_silence_end (silence_end_checkbox.get_active() ? silence_end : zero); } @@ -728,13 +796,13 @@ void ExportFormatDialog::update_clock (AudioClock & clock, ARDOUR::AnyTime const & time) { // TODO position - clock.set (session->convert_to_frames_at (0, time), true); + clock.set (_session->convert_to_frames (time), true); - AudioClock::Mode mode(AudioClock::SMPTE); + AudioClock::Mode mode(AudioClock::Timecode); switch (time.type) { - case AnyTime::SMPTE: - mode = AudioClock::SMPTE; + case AnyTime::Timecode: + mode = AudioClock::Timecode; break; case AnyTime::BBT: mode = AudioClock::BBT; @@ -753,32 +821,29 @@ ExportFormatDialog::update_clock (AudioClock & clock, ARDOUR::AnyTime const & ti void ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock) { - if (!session) { + if (!_session) { return; } - nframes_t frames = clock.current_duration(); + framecnt_t frames = clock.current_duration(); switch (clock.mode()) { - case AudioClock::SMPTE: - time.type = AnyTime::SMPTE; - session->smpte_time (frames, time.smpte); + case AudioClock::Timecode: + time.type = AnyTime::Timecode; + _session->timecode_time (frames, time.timecode); break; case AudioClock::BBT: time.type = AnyTime::BBT; - session->bbt_time (frames, time.bbt); + _session->bbt_time (frames, time.bbt); break; case AudioClock::MinSec: time.type = AnyTime::Seconds; - time.seconds = (double) frames / session->frame_rate(); + time.seconds = (double) frames / _session->frame_rate(); break; case AudioClock::Frames: time.type = AnyTime::Frames; time.frames = frames; break; - case AudioClock::Off: - silence_end_checkbox.set_active (false); - return; } } @@ -797,7 +862,7 @@ ExportFormatDialog::update_tagging_selection () } void -ExportFormatDialog::change_encoding_options (ExportFormatManager::FormatPtr ptr) +ExportFormatDialog::change_encoding_options (ExportFormatPtr ptr) { empty_encoding_option_table (); @@ -806,13 +871,13 @@ ExportFormatDialog::change_encoding_options (ExportFormatManager::FormatPtr ptr) boost::shared_ptr flac_ptr; boost::shared_ptr bwf_ptr; - if (linear_ptr = boost::dynamic_pointer_cast (ptr)) { + if ((linear_ptr = boost::dynamic_pointer_cast (ptr))) { show_linear_enconding_options (linear_ptr); - } else if (ogg_ptr = boost::dynamic_pointer_cast (ptr)) { + } else if ((ogg_ptr = boost::dynamic_pointer_cast (ptr))) { show_ogg_enconding_options (ogg_ptr); - } else if (flac_ptr = boost::dynamic_pointer_cast (ptr)) { + } else if ((flac_ptr = boost::dynamic_pointer_cast (ptr))) { show_flac_enconding_options (flac_ptr); - } else if (bwf_ptr = boost::dynamic_pointer_cast (ptr)) { + } else if ((bwf_ptr = boost::dynamic_pointer_cast (ptr))) { show_bwf_enconding_options (bwf_ptr); } else { std::cout << "Unrecognized format!" << std::endl; @@ -857,8 +922,6 @@ ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr