diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-14 15:14:56 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-14 15:21:16 +0200 |
commit | 22bddf543421f2a75a5a807009ea3e96dcb26cac (patch) | |
tree | eb1b3608a95557c6999138afc4aba68a722d2d1e /libs/ardour/slavable_automation_control.cc | |
parent | e0a1c7690acc0c79c070bb23c992ab6b62cbf2c6 (diff) |
Special-case VCA at 0 (-inf dB), force gain slaves to -inf dB
Diffstat (limited to 'libs/ardour/slavable_automation_control.cc')
-rw-r--r-- | libs/ardour/slavable_automation_control.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index 46b86c7cf5..cb88d36fe9 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -150,9 +150,7 @@ SlavableAutomationControl::masters_curve_multiply (framepos_t start, framepos_t = boost::dynamic_pointer_cast<SlavableAutomationControl>(mr->second.master()); assert (sc); rv |= sc->masters_curve_multiply (start, end, vec, veclen); - if (mr->second.val_master () != 0) { - apply_gain_to_buffer (vec, veclen, 1.f / mr->second.val_master ()); - } + apply_gain_to_buffer (vec, veclen, mr->second.val_master_inv ()); } return rv; } @@ -166,7 +164,7 @@ SlavableAutomationControl::reduce_by_masters_locked (double value, bool ignore_a /* need to scale given value by current master's scaling */ const double masters_value = get_masters_value_locked(); if (masters_value == 0.0) { - value = 0.0; // XXX 1.0, see master_ratio(), val_master_inv() + value = 0.0; } else { value /= masters_value; value = std::max (lower(), std::min(upper(), value)); |