[SCM] calf/master: + LADSPA: make the hint guessing logic compatible with logarithmic ports (makes default values for Reverb sane again)

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:38:51 UTC 2013


The following commit has been merged in the master branch:
commit a12e4795c1ab5d1d1f6bdb8eb05bddfbe5322947
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sun Jan 18 14:01:29 2009 +0000

    + LADSPA: make the hint guessing logic compatible with logarithmic ports (makes default values for Reverb sane again)

diff --git a/src/calf/ladspa_wrap.h b/src/calf/ladspa_wrap.h
index 5e6ae53..fdd3332 100644
--- a/src/calf/ladspa_wrap.h
+++ b/src/calf/ladspa_wrap.h
@@ -201,6 +201,8 @@ struct ladspa_wrapper
                     break;
                 default: {
                     int defpt = (int)(100 * (pp.def_value - pp.min) / (pp.max - pp.min));
+                    if ((pp.flags & PF_SCALEMASK) == PF_SCALE_LOG)
+                        defpt = (int)(100 * log(pp.def_value / pp.min) / log(pp.max / pp.min));
                     if (defpt < 12)
                         prh.HintDescriptor |= LADSPA_HINT_DEFAULT_MINIMUM;
                     else if (defpt < 37)

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list