, max_peak (minus_infinity())
, meter_type (MeterPeak)
, visible_meter_type (MeterType(0))
- , visible_meter_count (0)
+ , meter_count (0)
+ , max_visible_meters (0)
, color_changed (false)
{
set_session (s);
(*i).packed = false;
}
}
- visible_meter_count = 0;
+ meter_count = 0;
+}
+
+void
+LevelMeterBase::set_max_audio_meter_count (uint32_t cnt)
+{
+ if (cnt == max_visible_meters) {
+ return;
+ }
+ color_changed = true; // force re-setup
+ max_visible_meters = cnt;
+ setup_meters (meter_length, regular_meter_width, thin_meter_width);
}
void
width = rint (width * UIConfiguration::instance().get_ui_scale());
if ( meters.size() > 0
- && nmeters == visible_meter_count
+ && nmeters == meter_count
&& meters[0].width == width
&& meters[0].length == len
&& !color_changed
(meters.size() > 0) ? "yes" : "no",
(meters.size() > 0 && meters[0].width == width) ? "yes" : "no",
(meters.size() > 0 && meters[0].length == len) ? "yes" : "no",
- (nmeters == visible_meter_count) ? "yes" : "no",
+ (nmeters == meter_count) ? "yes" : "no",
(meter_type == visible_meter_type) ? "yes" : "no",
!color_changed ? "yes" : "no"
);
//pack_end (*meters[n].meter, false, false);
mtr_pack (*meters[n].meter);
- meters[n].meter->show_all ();
meters[n].packed = true;
+ if (max_visible_meters == 0 || (uint32_t) n < max_visible_meters + nmidi) {
+ meters[n].meter->show_all ();
+ } else {
+ meters[n].meter->hide ();
+ }
}
//show();
color_changed = false;
visible_meter_type = meter_type;
- visible_meter_count = nmeters;
+ meter_count = nmeters;
}
void
void clear_meters (bool reset_highlight = true);
void hide_meters ();
void setup_meters (int len=0, int width=3, int thin=2);
+ void set_max_audio_meter_count (uint32_t cnt = 0);
void set_type (ARDOUR::MeterType);
ARDOUR::MeterType get_type () { return meter_type; }
float max_peak;
ARDOUR::MeterType meter_type;
ARDOUR::MeterType visible_meter_type;
- uint32_t visible_meter_count;
+ uint32_t meter_count;
+ uint32_t max_visible_meters;
PBD::ScopedConnection _configuration_connection;
PBD::ScopedConnection _meter_type_connection;
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead)
));
- add_option (_("Editor"),
- new BoolOption (
- "show-track-meters",
- _("Show meters on tracks in the editor"),
- sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_track_meters),
- sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_track_meters)
- ));
-
add_option (_("Editor"),
new BoolOption (
"show-editor-meter",
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_style_led)
));
+ add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Editor Meters")));
+
+ add_option (S_("Preferences|Metering"),
+ new BoolOption (
+ "show-track-meters",
+ _("Show meters on tracks in the editor"),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_track_meters),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_track_meters)
+ ));
+
+ add_option (S_("Preferences|Metering"),
+ new BoolOption (
+ "editor-stereo-only-meters",
+ _("Show at most stereo meters in the track-header"),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_editor_stereo_only_meters),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_editor_stereo_only_meters)
+ ));
+
add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Post Export Analysis")));
add_option (S_("Preferences|Metering"),
number_label.set_fallthrough_to_parent (true);
sess->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context());
+ UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::parameter_changed));
+
+ parameter_changed ("editor-stereo-only-meters");
}
void
{
if (p == "track-name-number") {
update_track_number_visibility();
+ } else if (p == "editor-stereo-only-meters") {
+ if (UIConfiguration::instance().get_editor_stereo_only_meters()) {
+ gm.get_level_meter().set_max_audio_meter_count (2);
+ } else {
+ gm.get_level_meter().set_max_audio_meter_count (0);
+ }
}
}
UI_CONFIG_VARIABLE (bool, primary_clock_delta_edit_cursor, "primary-clock-delta-edit-cursor", false)
UI_CONFIG_VARIABLE (bool, secondary_clock_delta_edit_cursor, "secondary-clock-delta-edit-cursor", false)
UI_CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true)
+UI_CONFIG_VARIABLE (bool, editor_stereo_only_meters, "editor-stereo-only-meters", false)
UI_CONFIG_VARIABLE (bool, follow_edits, "follow-edits", false)
UI_CONFIG_VARIABLE (bool, super_rapid_clock_update, "super-rapid-clock-update", false)
UI_CONFIG_VARIABLE (bool, autoscroll_editor, "autoscroll-editor", true)