diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2015-03-25 16:47:25 -0500 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-22 00:22:43 +0200 |
commit | 46f97e8d92241c94d12d81ea182a9172df98e61e (patch) | |
tree | f757e7014aa6260b7d927b35bcf1fd221e2d40e4 /libs/ardour/panner_shell.cc | |
parent | 187ddb3bad70088f901ed1ea5e1402519fd393b4 (diff) |
Initial Gain Coefficient tweaks
1) Disambiguate 1.0 to GAIN_COEFF_UNITY, and 0.0 to GAIN_COEFF_ZERO
2) Add GAIN_COEFF_SMALL which replaces SMALL_SIGNAL (-140dB)
3) GAIN_COEFF_SMALL can used to avoid interpolating towards -inf on a db scale
4) GAIN_COEFF_SMALL is used to detect very small (denormal?) gains and memset to zero
Diffstat (limited to 'libs/ardour/panner_shell.cc')
-rw-r--r-- | libs/ardour/panner_shell.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/panner_shell.cc b/libs/ardour/panner_shell.cc index 7b19977b9c..fd5564bbef 100644 --- a/libs/ardour/panner_shell.cc +++ b/libs/ardour/panner_shell.cc @@ -284,13 +284,13 @@ PannerShell::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pf AudioBuffer& dst = outbufs.get_audio(0); - if (gain_coeff == 0.0f) { + if (gain_coeff == GAIN_COEFF_ZERO) { /* gain was zero, so make it silent */ dst.silence (nframes); - } else if (gain_coeff == 1.0f){ + } else if (gain_coeff == GAIN_COEFF_UNITY){ /* mix all input buffers into the output */ @@ -386,7 +386,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame, if (!(as & Play || ((as & Touch) && !_panner->touching()))) { // Speed quietning - gain_t gain_coeff = 1.0; + gain_t gain_coeff = GAIN_COEFF_UNITY; if (fabsf(_session.transport_speed()) > 1.5f && Config->get_quieten_at_speed ()) { gain_coeff = speed_quietning; |