Increase precision of numeric dB entry
This follows5a41ca8fdf
anddf1e6fda2d
. Even though this kind of precision is rarely needed, rounding to a single digit is inconsistent with various places that display more than one digit, or allow more accurate control.
This commit is contained in:
parent
c2ffa07e28
commit
8b5737b8d2
@ -54,7 +54,7 @@ value_as_string(const ARDOUR::ParameterDescriptor& desc,
|
||||
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
|
||||
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());
|
||||
} else if (desc.type == GainAutomation || desc.type == BusSendLevel || desc.type == TrimAutomation || desc.type == EnvelopeAutomation || desc.type == MainOutVolume) {
|
||||
snprintf(buf, sizeof(buf), "%.1f dB", accurate_coefficient_to_dB (v));
|
||||
snprintf(buf, sizeof(buf), "%.2f dB", accurate_coefficient_to_dB (v));
|
||||
} else if (desc.type == PanWidthAutomation) {
|
||||
snprintf (buf, sizeof (buf), "%d%%", (int) floor (100.0 * v));
|
||||
} else if (!desc.print_fmt.empty()) {
|
||||
|
@ -61,7 +61,7 @@ BarController::BarController (Gtk::Adjustment& adj,
|
||||
spinner.signal_activate().connect (mem_fun (*this, &BarController::entry_activated));
|
||||
spinner.signal_focus_out_event().connect (mem_fun (*this, &BarController::entry_focus_out));
|
||||
if (mc && mc->is_gain_like ()) {
|
||||
spinner.set_digits (1); // 0.1 dB
|
||||
spinner.set_digits (2); // 0.01 dB
|
||||
} else {
|
||||
spinner.set_digits (4);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user