From 135ffdcf6b27411b0d075449b0eda8e4c5fdd2cb Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 4 Jul 2017 20:09:11 +0200 Subject: [PATCH] Work-around for plugins with log-scale parameter 0..SR/2 --- libs/ardour/parameter_descriptor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/ardour/parameter_descriptor.cc b/libs/ardour/parameter_descriptor.cc index 9e02bc01ab..3bbc37e95e 100644 --- a/libs/ardour/parameter_descriptor.cc +++ b/libs/ardour/parameter_descriptor.cc @@ -157,6 +157,10 @@ ParameterDescriptor::update_steps() if (toggled || enumeration) { logarithmic = false; } + if (logarithmic && sr_dependent && upper > lower && lower == 0) { + /* work-around for plugins with a log-scale control 0..SR; log (0) is not defined */ + lower = upper / 1000.f; + } if (logarithmic && (upper <= lower || lower * upper <= 0)) { logarithmic = false; }