diff plugin/LADSPAPluginInstance.cpp @ 356:ca3b91119482

* fix support for logarithmic hints in plugin parameters
author Chris Cannam
date Mon, 17 Dec 2007 12:32:28 +0000
parents dc46851837d6
children 9b35a1731c3d
line wrap: on
line diff
--- a/plugin/LADSPAPluginInstance.cpp	Thu Dec 13 17:14:33 2007 +0000
+++ b/plugin/LADSPAPluginInstance.cpp	Mon Dec 17 12:32:28 2007 +0000
@@ -515,6 +515,19 @@
     }
 }
 
+int
+LADSPAPluginInstance::getParameterDisplayHint(unsigned int parameter) const
+{
+    if (parameter >= m_controlPortsIn.size()) return 0.0;
+
+    LADSPAPluginFactory *f = dynamic_cast<LADSPAPluginFactory *>(m_factory);
+    if (f) {
+	return f->getPortDisplayHint(m_descriptor, m_controlPortsIn[parameter].first);
+    } else {
+	return PortHint::NoHint;
+    }
+}
+
 void
 LADSPAPluginInstance::run(const Vamp::RealTime &)
 {