mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
GUI support to en/disable master-bus output gain control
This commit is contained in:
parent
4dffe6e26e
commit
aa9c5737cc
6 changed files with 45 additions and 9 deletions
|
|
@ -332,6 +332,7 @@ public:
|
|||
void restore_editing_space ();
|
||||
|
||||
void show_ui_prefs ();
|
||||
void show_mixer_prefs ();
|
||||
|
||||
bool check_audioengine(Gtk::Window&);
|
||||
|
||||
|
|
|
|||
|
|
@ -865,6 +865,14 @@ ARDOUR_UI::show_ui_prefs ()
|
|||
rc_option_editor->set_current_page (_("Appearance"));
|
||||
}
|
||||
}
|
||||
void
|
||||
ARDOUR_UI::show_mixer_prefs ()
|
||||
{
|
||||
if (rc_option_editor) {
|
||||
show_tabbable (rc_option_editor);
|
||||
rc_option_editor->set_current_page (_("Mixer"));
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
|
||||
|
|
|
|||
|
|
@ -1919,7 +1919,8 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Loudness Analysis"), sigc::mem_fun(*this, &Editor::loudness_analyze_range_selection)));
|
||||
edit_items.push_back (MenuElem (_("Spectral Analysis"), sigc::mem_fun(*this, &Editor::spectral_analyze_range_selection)));
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Analyze Session Loudness..."), sigc::mem_fun(*this, &Editor::analyze_range_export)));
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
edit_items.push_back (
|
||||
|
|
@ -1975,9 +1976,6 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
edit_items.push_back (MenuElem (_("Bounce Range to Source List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false)));
|
||||
edit_items.push_back (MenuElem (_("Bounce Range to Source List with Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true)));
|
||||
edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection)));
|
||||
#ifndef NDEBUG // debug builds only, so far
|
||||
edit_items.push_back (MenuElem (_("Export Analyze Range..."), sigc::mem_fun(*this, &Editor::analyze_range_export)));
|
||||
#endif
|
||||
if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) {
|
||||
edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*(ARDOUR_UI::instance()), &ARDOUR_UI::export_video), true)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "ardour/source_factory.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "ardour_message.h"
|
||||
#include "audio_region_view.h"
|
||||
#include "audio_time_axis.h"
|
||||
|
|
@ -94,6 +95,15 @@ Editor::export_selection ()
|
|||
void
|
||||
Editor::measure_master_loudness (bool range_selection)
|
||||
{
|
||||
if (!Config->get_use_master_volume ()) {
|
||||
ArdourMessageDialog md (_("Master bus output gain control is disabled.\nVisit preferences to enable it?"), false,
|
||||
MESSAGE_QUESTION, BUTTONS_YES_NO);
|
||||
if (md.run () == RESPONSE_YES) {
|
||||
ARDOUR_UI::instance()->show_mixer_prefs ();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
samplepos_t start, end;
|
||||
TimeSelection const& ts (get_selection().time);
|
||||
if (range_selection && !ts.empty ()) {
|
||||
|
|
@ -106,20 +116,20 @@ Editor::measure_master_loudness (bool range_selection)
|
|||
|
||||
if (start >= end) {
|
||||
if (range_selection) {
|
||||
ArdourMessageDialog (_("Loudness Analysis requires a session-range or range-selection."));
|
||||
ArdourMessageDialog (_("Loudness Analysis requires a session-range or range-selection."), false, MESSAGE_ERROR).run ();
|
||||
} else {
|
||||
ArdourMessageDialog (_("Loudness Analysis requires a session-range."));
|
||||
ArdourMessageDialog (_("Loudness Analysis requires a session-range."), false, MESSAGE_ERROR).run ();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_session->master_volume()) {
|
||||
ArdourMessageDialog (_("Loudness Analysis is only available for sessions with a master-bus"));
|
||||
ArdourMessageDialog (_("Loudness Analysis is only available for sessions with a master-bus"), false, MESSAGE_ERROR).run ();
|
||||
return;
|
||||
}
|
||||
assert (_session->master_out());
|
||||
if (_session->master_out()->output()->n_ports().n_audio() != 2) {
|
||||
ArdourMessageDialog (_("Loudness Analysis is only available for sessions with a stereo master-bus"));
|
||||
ArdourMessageDialog (_("Loudness Analysis is only available for sessions with a stereo master-bus"), false, MESSAGE_ERROR).run ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -593,8 +593,10 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
solo_button->hide ();
|
||||
mute_button->show ();
|
||||
rec_mon_table.hide ();
|
||||
master_volume_table.show ();
|
||||
mute_solo_table.attach (*mute_button, 0, 2, 0, 1);
|
||||
if (Config->get_use_master_volume ()) {
|
||||
master_volume_table.show ();
|
||||
}
|
||||
|
||||
if (_volume_control_knob == 0) {
|
||||
assert (_loudess_analysis_button == 0);
|
||||
|
|
@ -2452,6 +2454,14 @@ MixerStrip::parameter_changed (string p)
|
|||
} else if (p == "track-name-number") {
|
||||
name_changed ();
|
||||
update_track_number_visibility();
|
||||
} else if (p == "use-master-volume") {
|
||||
if (route () && route()->is_master()) {
|
||||
if (Config->get_use_master_volume ()) {
|
||||
master_volume_table.show ();
|
||||
} else {
|
||||
master_volume_table.hide ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2838,6 +2838,15 @@ RCOptionEditor::RCOptionEditor ()
|
|||
|
||||
add_option (_("Mixer"), pa);
|
||||
|
||||
add_option (_("Mixer"), new OptionEditorHeading (_("Master")));
|
||||
add_option (_("Mixer"),
|
||||
new BoolOption (
|
||||
"use-master-volume",
|
||||
_("Enable master-bus output gain control"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_master_volume),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_master_volume)
|
||||
));
|
||||
|
||||
add_option (_("Mixer"), new OptionEditorHeading (_("Default Track / Bus Muting Options")));
|
||||
|
||||
add_option (_("Mixer"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue