projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
785478b
)
avoid delivering NaN's when setting up a generic plugin UI
author
Paul Davis
<paul@linuxaudiosystems.com>
Sun, 28 Nov 2010 18:29:21 +0000
(18:29 +0000)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Sun, 28 Nov 2010 18:29:21 +0000
(18:29 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8116
d708f5d6
-7413-0410-9779-
e7cbd77b26cf
gtk2_ardour/generic_pluginui.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/generic_pluginui.cc
b/gtk2_ardour/generic_pluginui.cc
index ca9fd2714929318b96399297aec0ffb43612d1f5..99969e1b611d00a7a93aef847a597cd210f0079c 100644
(file)
--- a/
gtk2_ardour/generic_pluginui.cc
+++ b/
gtk2_ardour/generic_pluginui.cc
@@
-527,7
+527,12
@@
GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
}
if (control_ui->logarithmic) {
- adj->set_value(log(plugin->get_parameter(port_index)));
+ double val = plugin->get_parameter (port_index);
+ if (isnan (val) || val <= 0.0) {
+ adj->set_value (0.0);
+ } else {
+ adj->set_value (log(val));
+ }
} else{
adj->set_value(plugin->get_parameter(port_index));
}