diff options
author | Carl Hetherington <carl@carlh.net> | 2009-08-22 10:21:39 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-08-22 10:21:39 +0000 |
commit | 970a3a7292287098ab36203d967ea1b1d0ca6117 (patch) | |
tree | ace4afdc4ea8505bdb210d603e6d19c102a9514f /gtk2_ardour/gain_meter.cc | |
parent | 4f3bddf7ef163c3106ba973123cbc657ebaf4b74 (diff) |
Introduce an accurate version of coefficient_to_dB and use it in non speed-critical
code. Fixes mantis 2833.
git-svn-id: svn://localhost/ardour2/branches/3.0@5565 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 40d68f551d..425929c9d2 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -375,17 +375,17 @@ GainMeterBase::show_gain () char buf[32]; float v = gain_adjustment.get_value(); - + if (!_is_midi) { if (v == 0.0) { strcpy (buf, _("-inf")); } else { - snprintf (buf, sizeof (buf), "%.1f", coefficient_to_dB (slider_position_to_gain (v))); + snprintf (buf, sizeof (buf), "%.1f", accurate_coefficient_to_dB (slider_position_to_gain (v))); } } else { snprintf (buf, sizeof (buf), "%.1f", v); } - + gain_display.set_text (buf); } |