diff --git a/doc/updating_waf.txt b/doc/updating_waf.txt index 4030d0706b..622a0f6b6a 100644 --- a/doc/updating_waf.txt +++ b/doc/updating_waf.txt @@ -1,5 +1,5 @@ Download waf (http://code.google.com/p/waf/) -Download autowaf (http://svn.drobilla.net/autowaf) +autowaf.py is present in the tools directory of the Ardour source code. From within the waf source tree, run: diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 0ce21932e9..763b4070be 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2194,8 +2194,13 @@ ARDOUR_UI::snapshot_session (bool switch_to_it) prompter.set_name ("Prompter"); prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); - prompter.set_title (_("Take Snapshot")); - prompter.set_prompt (_("Name of new snapshot")); + if (switch_to_it) { + prompter.set_title (_("Save as...")); + prompter.set_prompt (_("New session name")); + } else { + prompter.set_title (_("Take Snapshot")); + prompter.set_prompt (_("Name of new snapshot")); + } if (!switch_to_it) { char timebuf[128]; diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index fecc79d46b..1b39da19e2 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -197,7 +197,9 @@ ARDOUR_UI::set_session (Session *s) editor_meter_peak_display.hide(); } - if (_session && _session->master_out()) { + if (_session + && _session->master_out() + && _session->master_out()->n_outputs().n(DataType::AUDIO) > 0) { editor_meter = new LevelMeterHBox(_session); editor_meter->set_meter (_session->master_out()->shared_peak_meter().get()); editor_meter->clear_meters(); @@ -220,12 +222,17 @@ ARDOUR_UI::set_session (Session *s) editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false); if (Config->get_show_editor_meter()) { + transport_tearoff_hbox.pack_start (meter_box, false, false); + transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false); meter_box.show(); editor_meter_peak_display.show(); - } else { - meter_box.hide(); - editor_meter_peak_display.hide(); + } else if (meter_box.get_parent()) { + transport_tearoff_hbox.remove (meter_box); + transport_tearoff_hbox.remove (editor_meter_peak_display); } + } else if (meter_box.get_parent()) { + transport_tearoff_hbox.remove (meter_box); + transport_tearoff_hbox.remove (editor_meter_peak_display); } } diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 0e28900450..c531f006e2 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -402,11 +402,13 @@ ARDOUR_UI::parameter_changed (std::string p) } else if (p == "show-editor-meter") { bool show = Config->get_show_editor_meter(); if (editor_meter && show) { + transport_tearoff_hbox.pack_start (meter_box, false, false); + transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false); meter_box.show(); editor_meter_peak_display.show(); - } else if (editor_meter && !show) { - meter_box.hide(); - editor_meter_peak_display.hide(); + } else if (editor_meter && !show && meter_box.get_parent()) { + transport_tearoff_hbox.remove (meter_box); + transport_tearoff_hbox.remove (editor_meter_peak_display); } } } diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 6680e95b15..b24d22f1b9 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -620,6 +620,9 @@ AudioClock::end_edit (bool modify) break; case Frames: + if (edit_string.length() < 1) { + edit_string = pre_edit_string; + } break; } diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 8916806a15..6351c512c1 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -215,9 +215,9 @@ ExportDialog::init_components () } void -ExportDialog::notify_errors () +ExportDialog::notify_errors (bool force) { - if (status->errors()) { + if (force || status->errors()) { std::string txt = _("Export has been aborted due to an error!\nSee the Log for details."); Gtk::MessageDialog msg (txt, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msg.run(); @@ -303,9 +303,14 @@ ExportDialog::show_conflicting_files () void ExportDialog::do_export () { - profile_manager->prepare_for_export (); - handler->do_export (); - show_progress (); + try { + profile_manager->prepare_for_export (); + handler->do_export (); + show_progress (); + } catch(std::exception & e) { + error << string_compose (_("Export initialization failed: %1"), e.what()) << endmsg; + notify_errors(true); + } } void diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h index 52c53660d8..756a3e7b53 100644 --- a/gtk2_ardour/export_dialog.h +++ b/gtk2_ardour/export_dialog.h @@ -95,7 +95,7 @@ class ExportDialog : public ArdourDialog { void expanded_changed(); - void notify_errors (); + void notify_errors (bool force = false); void close_dialog (); void sync_with_manager (); diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index 8286cbeb95..b71469b4c6 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -101,6 +101,7 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr friend class MixerStrip; friend class MeterStrip; + friend class RouteTimeAxisView; boost::shared_ptr _route; boost::shared_ptr _meter; boost::shared_ptr _amp; diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index 703870ecef..886374c61a 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -177,6 +177,11 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) namebx.set_size_request(18, 52); namebx.pack_start(name_label, true, false, 3); + mon_in_box.pack_start(*monitor_input_button, true, false); + btnbox.pack_start(mon_in_box, false, false, 1); + mon_disk_box.pack_start(*monitor_disk_button, true, false); + btnbox.pack_start(mon_disk_box, false, false, 1); + recbox.pack_start(*rec_enable_button, true, false); btnbox.pack_start(recbox, false, false, 1); mutebox.pack_start(*mute_button, true, false); @@ -193,9 +198,17 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) solo_button->set_corner_radius(2); solo_button->set_size_request(16, 16); + monitor_input_button->set_corner_radius(2); + monitor_input_button->set_size_request(16, 16); + + monitor_disk_button->set_corner_radius(2); + monitor_disk_button->set_size_request(16, 16); + mutebox.set_size_request(16, 16); solobox.set_size_request(16, 16); recbox.set_size_request(16, 16); + mon_in_box.set_size_request(16, 16); + mon_disk_box.set_size_request(16, 16); spacer.set_size_request(-1,0); update_button_box(); @@ -232,6 +245,8 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) mtr_container.show(); mtr_hsep.show(); nfo_vbox.show(); + monitor_input_button->show(); + monitor_disk_button->show(); _route->shared_peak_meter()->ConfigurationChanged.connect ( route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context() @@ -339,6 +354,8 @@ MeterStrip::set_button_names() } } + monitor_input_button->set_text (_("I")); + monitor_disk_button->set_text (_("D")); } void @@ -651,6 +668,14 @@ MeterStrip::update_button_box () } else { recbox.hide(); } + if (_session->config.get_show_monitor_on_meterbridge()) { + height += 18 + 18; + mon_in_box.show(); + mon_disk_box.show(); + } else { + mon_in_box.hide(); + mon_disk_box.hide(); + } btnbox.set_size_request(16, height); check_resize(); } @@ -684,6 +709,9 @@ MeterStrip::parameter_changed (std::string const & p) else if (p == "show-name-on-meterbridge") { update_name_box(); } + else if (p == "show-monitor-on-meterbridge") { + update_button_box(); + } else if (p == "meterbridge-label-height") { queue_resize(); } diff --git a/gtk2_ardour/meter_strip.h b/gtk2_ardour/meter_strip.h index e817f7d5c6..e1bae71326 100644 --- a/gtk2_ardour/meter_strip.h +++ b/gtk2_ardour/meter_strip.h @@ -108,6 +108,8 @@ class MeterStrip : public Gtk::VBox, public RouteUI Gtk::HBox mutebox; Gtk::HBox solobox; Gtk::HBox recbox; + Gtk::HBox mon_in_box; + Gtk::HBox mon_disk_box; Gtk::Alignment meter_align; Gtk::Alignment peak_align; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 1749e4dd66..5362f7c17d 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2598,7 +2598,7 @@ ProcessorBox::generate_processor_title (boost::shared_ptr pi) if (owner) { return string_compose(_("%1: %2 (by %3)"), owner->name(), pi->name(), maker); } else { - return string_compose(_("%2 (by %3)"), pi->name(), maker); + return string_compose(_("%1 (by %2)"), pi->name(), maker); } } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index a113fe9db8..3c7f6a515d 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2266,6 +2266,8 @@ RouteTimeAxisView::meter_changed () if (_route && !no_redraw) { request_redraw (); } + // reset peak when meter point changes + gm.reset_peak_display(); } void diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc index 60f575fb16..f243973013 100644 --- a/gtk2_ardour/session_option_editor.cc +++ b/gtk2_ardour/session_option_editor.cc @@ -318,6 +318,13 @@ SessionOptionEditor::SessionOptionEditor (Session* s) sigc::mem_fun (*_session_config, &SessionConfiguration::set_show_solo_on_meterbridge) )); + add_option (_("Meterbridge"), new BoolOption ( + "show-monitor-on-meterbridge", + _("Monitor Buttons"), + sigc::mem_fun (*_session_config, &SessionConfiguration::get_show_monitor_on_meterbridge), + sigc::mem_fun (*_session_config, &SessionConfiguration::set_show_monitor_on_meterbridge) + )); + add_option (_("Meterbridge"), new OptionEditorHeading (_("Name Labels"))); add_option (_("Meterbridge"), new BoolOption ( diff --git a/libs/ardour/ardour/session_configuration_vars.h b/libs/ardour/ardour/session_configuration_vars.h index 5e93c01b79..6349692e77 100644 --- a/libs/ardour/ardour/session_configuration_vars.h +++ b/libs/ardour/ardour/session_configuration_vars.h @@ -63,5 +63,6 @@ CONFIG_VARIABLE (bool, show_midi_on_meterbridge, "show-midi-on-meterbridge", tru CONFIG_VARIABLE (bool, show_rec_on_meterbridge, "show-rec-on-meterbridge", true) CONFIG_VARIABLE (bool, show_mute_on_meterbridge, "show-mute-on-meterbridge", false) CONFIG_VARIABLE (bool, show_solo_on_meterbridge, "show-solo-on-meterbridge", false) +CONFIG_VARIABLE (bool, show_monitor_on_meterbridge, "show-monitor-on-meterbridge", false) CONFIG_VARIABLE (bool, show_name_on_meterbridge, "show-name-on-meterbridge", true) CONFIG_VARIABLE (uint32_t, meterbridge_label_height, "meterbridge-label-height", 0) diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 8f8872353d..bc1d1de9cb 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1509,7 +1509,7 @@ LV2Plugin::allocate_atom_event_buffers() return; } - DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers\n", total_atom_buffers)); + DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers of %d bytes\n", total_atom_buffers, minimumSize)); _atom_ev_buffers = (LV2_Evbuf**) malloc((total_atom_buffers + 1) * sizeof(LV2_Evbuf*)); for (int i = 0; i < total_atom_buffers; ++i ) { _atom_ev_buffers[i] = lv2_evbuf_new(minimumSize, LV2_EVBUF_ATOM, @@ -1682,6 +1682,9 @@ LV2Plugin::connect_and_run(BufferSet& bufs, } } else if (!valid) { // Nothing we understand or care about, connect to scratch + // see note for midi-buffer size above + scratch_bufs.ensure_lv2_bufsize((flags & PORT_INPUT), + 0, _port_minimumSize[port_index]); _ev_buffers[port_index] = scratch_bufs.get_lv2_midi( (flags & PORT_INPUT), 0, (flags & PORT_EVENT)); } diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc index f9590bee11..d571f55688 100644 --- a/libs/ardour/processor.cc +++ b/libs/ardour/processor.cc @@ -63,6 +63,7 @@ Processor::Processor(Session& session, const string& name) , _display_to_user (true) , _pre_fader (false) , _ui_pointer (0) + , _owner (0) { } diff --git a/libs/audiographer/src/general/sample_format_converter.cc b/libs/audiographer/src/general/sample_format_converter.cc index ea70dc6094..5fe9a1185b 100644 --- a/libs/audiographer/src/general/sample_format_converter.cc +++ b/libs/audiographer/src/general/sample_format_converter.cc @@ -52,25 +52,24 @@ SampleFormatConverter::init (framecnt_t max_frames, int /* type */, int d template <> void -SampleFormatConverter::init (framecnt_t max_frames, int /*type*/, int data_width) +SampleFormatConverter::init (framecnt_t max_frames, int type, int data_width) { - if(throw_level (ThrowObject) && data_width < 24) { - throw Exception (*this, "Trying to use SampleFormatConverter for data widths < 24"); + // GDither is broken with GDither32bit if the dither depth is bigger than 24 + if(throw_level (ThrowObject) && data_width > 24) { + throw Exception (*this, "Trying to use SampleFormatConverter a data width > 24"); } - init_common (max_frames); - - // GDither is broken with GDither32bit if the dither depth - // is bigger than 24, so lets just use that... - dither = gdither_new (GDitherNone, channels, GDither32bit, 24); + dither = gdither_new ((GDitherType) type, channels, GDither32bit, data_width); } template <> void SampleFormatConverter::init (framecnt_t max_frames, int type, int data_width) { - if (throw_level (ThrowObject) && data_width != 16) { - throw Exception (*this, "Unsupported data width"); + if (throw_level (ThrowObject) && data_width > 16) { + throw Exception (*this, boost::str(boost::format + ("Data width (%1) too large for int16_t") + % data_width)); } init_common (max_frames); dither = gdither_new ((GDitherType) type, channels, GDither16bit, data_width); @@ -80,8 +79,10 @@ template <> void SampleFormatConverter::init (framecnt_t max_frames, int type, int data_width) { - if (throw_level (ThrowObject) && data_width != 8) { - throw Exception (*this, "Unsupported data width"); + if (throw_level (ThrowObject) && data_width > 8) { + throw Exception (*this, boost::str(boost::format + ("Data width (%1) too large for uint8_t") + % data_width)); } init_common (max_frames); dither = gdither_new ((GDitherType) type, channels, GDither8bit, data_width);